FIX #2073: Don't add empty lines to GHCI's history
authorIan Lynagh <igloo@earth.li>
Sun, 24 Feb 2008 14:32:56 +0000 (14:32 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 24 Feb 2008 14:32:56 +0000 (14:32 +0000)
compiler/ghci/InteractiveUI.hs

index 2594d13..8ff83f9 100644 (file)
@@ -599,6 +599,7 @@ readlineLoop = do
    splatSavedSession
    case l of
         Nothing -> return Nothing
+        Just "" -> return (Just "") -- Don't put empty lines in the history
         Just l  -> do
                    io (addHistory l)
                    str <- io $ consoleInputToUnicode True l