From e7ce636f05079ee21302ba9d53a8a672ba58e03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 22 Mar 2025 21:44:14 +0100 Subject: Avoid duplicating newline for terminal output --- main/Main.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'main') 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 -- cgit v1.2.3