[commit: packages/haskeline] release-0.7.2.3: Fix the behavior of unix-word-rubout (C-w) for emacs bindings (cherry picked from commit 0a5c8b05104ce109508bd24f733440a674fb8840) (da39fac)

git at git.haskell.org git at git.haskell.org
Sun Apr 17 18:38:46 UTC 2016


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

On branch  : release-0.7.2.3
Link       : http://git.haskell.org/packages/haskeline.git/commitdiff/da39fac5060f388145d90e3926a04fcf104bdfff

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

commit da39fac5060f388145d90e3926a04fcf104bdfff
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
    (cherry picked from commit 0a5c8b05104ce109508bd24f733440a674fb8840)


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

da39fac5060f388145d90e3926a04fcf104bdfff
 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