[commit: packages/haskeline] master: Fix the behavior of unix-word-rubout (C-w) for emacs bindings (0a5c8b0)

git at git.haskell.org git at git.haskell.org
Tue Dec 13 19:21:50 UTC 2016


Repository : ssh://git@git.haskell.org/haskeline

On branch  : master
Link       : http://git.haskell.org/packages/haskeline.git/commitdiff/0a5c8b05104ce109508bd24f733440a674fb8840

>---------------------------------------------------------------

commit 0a5c8b05104ce109508bd24f733440a674fb8840
Author: Zejun Wu <watashi at watashi.ws>
Date:   Thu Mar 10 18:00:18 2016 -0800

    Fix the behavior of unix-word-rubout (C-w) for emacs bindings


>---------------------------------------------------------------

0a5c8b05104ce109508bd24f733440a674fb8840
 System/Console/Haskeline/Emacs.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/System/Console/Haskeline/Emacs.hs b/System/Console/Haskeline/Emacs.hs
index d5e0622..66d3297 100644
--- a/System/Console/Haskeline/Emacs.hs
+++ b/System/Console/Haskeline/Emacs.hs
@@ -89,7 +89,7 @@ rotatePaste im = get >>= loop
 wordRight, wordLeft, bigWordLeft :: InsertMode -> InsertMode
 wordRight = goRightUntil (atStart (not . isAlphaNum))
 wordLeft = goLeftUntil (atStart isAlphaNum)
-bigWordLeft = goLeftUntil (atStart isSpace)
+bigWordLeft = goLeftUntil (atStart (not . isSpace))
 
 modifyWord :: ([Grapheme] -> [Grapheme]) -> InsertMode -> InsertMode
 modifyWord f im = IMode (reverse (f ys1) ++ xs) ys2



More information about the ghc-commits mailing list