diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-03-22 21:44:14 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-03-22 21:44:14 +0100 |
commit | e7ce636f05079ee21302ba9d53a8a672ba58e03c (patch) | |
tree | f067e3bf1c9e2b333a5fc0ce4f8cc39c4f56bd42 /main | |
parent | d9436e29a827822d0fe5c093283c57955cebe386 (diff) |
Avoid duplicating newline for terminal output
Diffstat (limited to 'main')
-rw-r--r-- | main/Main.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/main/Main.hs b/main/Main.hs index 0430b53..5f6c986 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -285,11 +285,7 @@ interactiveLoop st opts = withTerminal commandCompletion $ \term -> do void $ printLine term $ T.unpack $ displayIdentity $ headLocalIdentity erebosHead let tui = hasTerminalUI term - let extPrint = void . printLine term - let extPrintLn str = do - let str' = case reverse str of ('\n':_) -> str - _ -> str ++ "\n"; - extPrint $! str' -- evaluate str before calling extPrint to avoid blinking + let extPrintLn = void . printLine term let getInputLinesTui :: Either CommandState String -> MaybeT IO String getInputLinesTui eprompt = do |