From 0c3b673e1614677a20f0b0b22af8bd017228b5e0 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 10 Nov 2025 23:28:05 +0530 Subject: Add basic selection-add/remove commands --- lib/Daffm/Action/Core.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Daffm/Action/Core.hs') 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} -- cgit v1.3.1