diff options
author | bptato <nincsnevem662@gmail.com> | 2022-07-30 13:20:26 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-07-30 13:20:26 +0200 |
commit | f08b26d932d57e76a01e800371a27275961419d2 (patch) | |
tree | f5aaf3476b61a1b7a70f42b04ebee63e422abdc2 /src/client.nim | |
parent | ca81bbcecd3777e8b20e12332ef813b874dd7fa5 (diff) | |
download | chawan-f08b26d932d57e76a01e800371a27275961419d2.tar.gz |
Enable raw mode during rendering
So that non-processed characters aren't displayed on the screen
Diffstat (limited to 'src/client.nim')
-rw-r--r-- | src/client.nim | 6 |
1 files changed, 5 insertions, 1 deletions
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: |