Skip to content

Commit

Permalink
Fix killWord for emacs-keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
junjihashimoto committed Jun 9, 2018
1 parent 2fa57e3 commit 760efe9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion yi-keymap-emacs/src/Yi/Keymap/Emacs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ emacsKeys univArg =
, metaCh 'a' ?>>! repeatingArg (moveE unitSentence Backward)
, metaCh 'b' ?>>! repeatingArg prevWordB
, metaCh 'c' ?>>! repeatingArg capitaliseWordB
, metaCh 'd' ?>>! repeatingArg killWordB
, metaCh 'd' ?>>! killWord
, metaCh 'e' ?>>! repeatingArg (moveE unitSentence Forward)
, metaCh 'f' ?>>! repeatingArg nextWordB
, metaCh 'h' ?>>! repeatingArg (selectNParagraphs 1)
Expand Down
5 changes: 5 additions & 0 deletions yi-keymap-emacs/src/Yi/Keymap/Emacs/KillRing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ killLineB mbr = replicateM_ (fromMaybe 1 mbr) $ do
killLine :: Maybe Int -> YiM ()
killLine mbr = withCurrentBuffer (killLineB mbr) >> killringToClipboard

-- | M-d
-- | Like `killWordB`, but with system clipboard synchronization
killWord :: YiM ()
killWord = withCurrentBuffer (killWordB) >> killringToClipboard

killringGet :: EditorM R.YiString
killringGet = do
text :| _ <- uses killringA _krContents
Expand Down

0 comments on commit 760efe9

Please sign in to comment.