Merge pull request #856 from l29ah/prompt-return-normal-vim

X.Prompt: handle Return key in vim normal mode
This commit is contained in:
Tony Zorman 2023-12-20 05:58:38 +01:00 committed by GitHub
commit 75d67cfb1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -269,6 +269,9 @@
to cycle through the completions backwards. This is bound to to cycle through the completions backwards. This is bound to
`S-<TAB>` by default. `S-<TAB>` by default.
- The `vimLikeXPKeymap` now accepts the prompt upon pressing enter
in normal mode.
* `XMonad.Actions.Prefix` * `XMonad.Actions.Prefix`
- Added `orIfPrefixed`, a combinator to decide upon an action based - Added `orIfPrefixed`, a combinator to decide upon an action based

View File

@ -1138,6 +1138,8 @@ vimLikeXPKeymap' fromColor promptF pasteFilter notWord = M.fromList $
, (xK_c, promptSubmap (setModeDone True) changeVimXPKeymap , (xK_c, promptSubmap (setModeDone True) changeVimXPKeymap
>> setModeDone True >> setModeDone True
) )
, (xK_Return, acceptSelection)
, (xK_KP_Enter, acceptSelection)
] ++ ] ++
map (first $ (,) shiftMask) map (first $ (,) shiftMask)
[ (xK_dollar, endOfLine >> moveCursor Prev) [ (xK_dollar, endOfLine >> moveCursor Prev)