Skip to content

Commit

Permalink
Merge pull request #856 from l29ah/prompt-return-normal-vim
Browse files Browse the repository at this point in the history
X.Prompt: handle Return key in vim normal mode
  • Loading branch information
slotThe authored Dec 20, 2023
2 parents 3613d4d + 9609e0e commit 75d67cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@
to cycle through the completions backwards. This is bound to
`S-<TAB>` by default.

- The `vimLikeXPKeymap` now accepts the prompt upon pressing enter
in normal mode.

* `XMonad.Actions.Prefix`

- Added `orIfPrefixed`, a combinator to decide upon an action based
Expand Down
2 changes: 2 additions & 0 deletions XMonad/Prompt.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,8 @@ vimLikeXPKeymap' fromColor promptF pasteFilter notWord = M.fromList $
, (xK_c, promptSubmap (setModeDone True) changeVimXPKeymap
>> setModeDone True
)
, (xK_Return, acceptSelection)
, (xK_KP_Enter, acceptSelection)
] ++
map (first $ (,) shiftMask)
[ (xK_dollar, endOfLine >> moveCursor Prev)
Expand Down

0 comments on commit 75d67cf

Please sign in to comment.