aboutsummaryrefslogtreecommitdiff
path: root/lib/Daffm/Action/Core.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Daffm/Action/Core.hs')
-rw-r--r--lib/Daffm/Action/Core.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Daffm/Action/Core.hs b/lib/Daffm/Action/Core.hs
index 85f861a..ba50638 100644
--- a/lib/Daffm/Action/Core.hs
+++ b/lib/Daffm/Action/Core.hs
@@ -99,6 +99,14 @@ toggleCurrentFileSelection = do
Nothing -> pure ()
moveCurrent 1
+addFileSelection :: FilePathText -> AppEvent ()
+addFileSelection path = do
+ modify $ \st -> st {stateFileSelections = Set.insert path . stateFileSelections $ st}
+
+removeFileSelection :: FilePathText -> AppEvent ()
+removeFileSelection path = do
+ modify $ \st -> st {stateFileSelections = Set.delete path . stateFileSelections $ st}
+
clearFileSelections :: AppEvent ()
clearFileSelections =
modify $ \st -> st {stateFileSelections = Set.empty}