diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-06-12 00:40:39 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-06-12 00:47:18 +0530 |
| commit | 8828075fa3a25f37ec79507c0cf5179b76f35948 (patch) | |
| tree | 86646a646f423343b016f5d353d8384802e8b8b0 /lib/Daffm/State.hs | |
| parent | ed728dfdf33ad58113b7dd7b4402d3b15dca91d8 (diff) | |
| download | daffm-8828075fa3a25f37ec79507c0cf5179b76f35948.tar.gz daffm-8828075fa3a25f37ec79507c0cf5179b76f35948.zip | |
Add init path substitution
Diffstat (limited to 'lib/Daffm/State.hs')
| -rw-r--r-- | lib/Daffm/State.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Daffm/State.hs b/lib/Daffm/State.hs index fca72b6..c86df36 100644 --- a/lib/Daffm/State.hs +++ b/lib/Daffm/State.hs @@ -27,8 +27,8 @@ import qualified System.PosixCompat as Posix mkEditor :: (Zipper.GenericTextZipper a) => a -> Editor.Editor a FocusTarget mkEditor = Editor.editor FocusCmdline (Just 1) -mkEmptyAppState :: Configuration -> AppState -mkEmptyAppState config = +mkEmptyAppState :: Configuration -> FilePathText -> AppState +mkEmptyAppState config initPath = applyConfigToState config $ AppState { stateFiles = L.list FocusMain (Vec.fromList []) 1, @@ -44,7 +44,8 @@ mkEmptyAppState config = stateSearchTerm = Nothing, stateSearchMatches = Vec.empty, stateCustomCommands = Map.empty, - stateSearchIndex = 0 + stateSearchIndex = 0, + stateInitPath = initPath } applyConfigToState :: Configuration -> AppState -> AppState |
