From 8afb450eb104e5335f4b1b976512842f7059142c Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 21 Aug 2011 19:09:15 +0200 Subject: Show invalid input in case of parsing error in template As a side-effect, parts without substitution vars will be displayed as-is, fixing a bug reported by RC in the mailing list. --- src/Xmobar.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Xmobar.hs') diff --git a/src/Xmobar.hs b/src/Xmobar.hs index cf912b7..eb7a1dd 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -120,7 +120,7 @@ eventLoop xc@(XConf d _ w fs c) vs = block $ do startCommand :: (Runnable,String,String) -> IO (Maybe ThreadId, TVar String) startCommand (com,s,ss) | alias com == "" = do var <- atomically $ newTVar is - atomically $ writeTVar var "Could not parse the template" + atomically $ writeTVar var (s ++ ss) return (Nothing,var) | otherwise = do var <- atomically $ newTVar is let cb str = atomically $ writeTVar var (s ++ str ++ ss) -- cgit v1.2.3