X.Prompt: handle Return key in vim normal mode

This commit is contained in:
Sergey Alirzaev 2023-12-20 00:16:44 +01:00 committed by Tony Zorman
parent 3613d4d543
commit 9609e0ef2e
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)