diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-07-17 21:20:48 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-07-17 21:20:48 +0200 |
commit | 4684006e4dd4c42674ba17a35ba394c939674346 (patch) | |
tree | 2fcc45f7c4ecb8fdcd31bbfd21fe3fda75f8cb19 /main/Main.hs | |
parent | 79655a00f7d7a95d9954947df50a8b772af8e703 (diff) |
Evaluate external print parameter first to avoid blinking
Diffstat (limited to 'main/Main.hs')
-rw-r--r-- | main/Main.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/Main.hs b/main/Main.hs index d5b06ea..236e729 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -231,8 +231,10 @@ interactiveLoop st opts = runInputT inputSettings $ do tui <- haveTerminalUI extPrint <- getExternalPrint - let extPrintLn str = extPrint $ case reverse str of ('\n':_) -> str - _ -> str ++ "\n"; + 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 getInputLinesTui eprompt = do prompt <- case eprompt of |