From e909c3b8c6887b2fcee1debf34499794e5accac1 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 22 Jan 2011 03:33:08 +0100 Subject: Bug fix: don't get confused by align separators in input (issue 14) This solves the common case of a template separator character (such as {) popping up in xmobar's input (e.g., inside a window title) and confusing the parser. --- src/Plugins/StdinReader.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Plugins/StdinReader.hs') diff --git a/src/Plugins/StdinReader.hs b/src/Plugins/StdinReader.hs index 2ee217e..935d76a 100644 --- a/src/Plugins/StdinReader.hs +++ b/src/Plugins/StdinReader.hs @@ -26,7 +26,8 @@ data StdinReader = StdinReader instance Exec StdinReader where start StdinReader cb = do - cb =<< catch (hGetLineSafe stdin) (\(SomeException e) -> do hPrint stderr e; return "") + cb =<< catch (hGetLineSafe stdin) + (\(SomeException e) -> do hPrint stderr e; return "") eof <- hIsEOF stdin if eof then exitImmediately ExitSuccess -- cgit v1.2.3