From f08b26d932d57e76a01e800371a27275961419d2 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 30 Jul 2022 13:20:26 +0200 Subject: Enable raw mode during rendering So that non-processed characters aren't displayed on the screen --- src/client.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/client.nim') diff --git a/src/client.nim b/src/client.nim index 6d729572..2ab6281b 100644 --- a/src/client.nim +++ b/src/client.nim @@ -11,6 +11,7 @@ import io/buffer import io/cell import io/lineedit import io/loader +import io/term import js/javascript import js/regex import types/url @@ -468,7 +469,10 @@ proc launchClient*(client: Client, pages: seq[string], ctype: string, dump: bool eprint e.msg quit(1) - if stdout.isatty and not dump: client.inputLoop() + if stdout.isatty and not dump: + when defined(posix): + enableRawMode() + client.inputLoop() else: var buffer = client.buffer while buffer.next != nil: -- cgit 1.4.1-2-gfad0