Repository : ssh://darcs.haskell.org//srv/darcs/packages/haskeline On branch : master
http://hackage.haskell.org/trac/ghc/changeset/47b41cad04402d52b5579c78adf7d920a27f33d9 >--------------------------------------------------------------- commit 47b41cad04402d52b5579c78adf7d920a27f33d9 Author: Judah Jacobson <[email protected]> Date: Wed Oct 19 17:27:52 2011 +0000 Fix #116: type signature of wcwidth foreign call. Patch by Peter Herecek. This fixes a hang when the prompt contains an escape character. >--------------------------------------------------------------- System/Console/Haskeline/Backend/WCWidth.hs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Console/Haskeline/Backend/WCWidth.hs b/System/Console/Haskeline/Backend/WCWidth.hs index fc285d8..f06a165 100644 --- a/System/Console/Haskeline/Backend/WCWidth.hs +++ b/System/Console/Haskeline/Backend/WCWidth.hs @@ -13,13 +13,13 @@ import System.Console.Haskeline.LineState import Data.List import Foreign.C.Types -foreign import ccall unsafe mk_wcwidth :: CWchar -> Int +foreign import ccall unsafe mk_wcwidth :: CWchar -> CInt wcwidth :: Char -> Int wcwidth c = case mk_wcwidth $ toEnum $ fromEnum c of -1 -> 0 -- Control characters have zero width. (Used by the -- "\SOH...\STX" hack in LineState.stringToGraphemes.) - w -> w + w -> fromIntegral w gWidth :: Grapheme -> Int gWidth g = wcwidth (baseChar g) _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
