Skip to content

Commit

Permalink
Skip "\ESC...\STX" sequences when printing output in the terminal-sty…
Browse files Browse the repository at this point in the history
…le Win32 backend.
  • Loading branch information
judah committed Sep 10, 2010
1 parent 25fe300 commit f827f10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion System/Console/Haskeline/Backend/Win32.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ crlf :: String
crlf = "\r\n"

instance (MonadException m, MonadReader Layout m) => Term (Draw m) where
drawLineDiff = drawLineDiffWin
drawLineDiff (xs1,ys1) (xs2,ys2) = let
fixEsc = filter ((/= '\ESC') . baseChar)
in drawLineDiffWin (fixEsc xs1, fixEsc ys1) (fixEsc xs2, fixEsc ys2)
-- TODO now that we capture resize events.
-- first, looks like the cursor stays on the same line but jumps
-- to the beginning if cut off.
Expand Down

0 comments on commit f827f10

Please sign in to comment.