FIX #2073: Don't add empty lines to GHCI's history
[ghc-hetmet.git] / 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