diff options
author | bptato <nincsnevem662@gmail.com> | 2022-11-25 01:17:36 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-11-25 01:17:36 +0100 |
commit | 2d3b4faaffb62b6f449bd3dcb59f5ac4fbb16415 (patch) | |
tree | a07a1970757322e367c66a813a0a2eeafba23f18 /src/display/client.nim | |
parent | b086e346afeded51c94c9b77280dcea6f6b3ce8a (diff) | |
download | chawan-2d3b4faaffb62b6f449bd3dcb59f5ac4fbb16415.tar.gz |
Fix user style regression, add minimum-contrast
Diffstat (limited to 'src/display/client.nim')
-rw-r--r-- | src/display/client.nim | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/display/client.nim b/src/display/client.nim index f4acaee4..05a5a0fc 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -246,16 +246,6 @@ proc inputLoop(client: Client) = if event.fd == client.console.tty.getFileHandle(): client.input() stdout.flushFile() - elif event.fd in client.interval_fdis: - client.intervals[client.interval_fdis[event.fd]].handler() - elif event.fd in client.timeout_fdis: - let id = client.timeout_fdis[event.fd] - let timeout = client.timeouts[id] - timeout.handler() - client.clearTimeout(id) - elif event.fd == sigwinch: - client.attrs = getWindowAttributes(client.console.tty) - client.pager.windowChange(client.attrs) else: let container = client.fdmap[event.fd] if not client.pager.handleEvent(container): @@ -263,10 +253,22 @@ proc inputLoop(client: Client) = for msg in client.pager.status: eprint msg client.quit(1) - elif Error in event.events: + if Error in event.events: eprint "Error", event #TODO handle errors - else: assert false + if Signal in event.events: + if event.fd == sigwinch: + client.attrs = getWindowAttributes(client.console.tty) + client.pager.windowChange(client.attrs) + else: assert false + if Event.Timer in event.events: + if event.fd in client.interval_fdis: + client.intervals[client.interval_fdis[event.fd]].handler() + if event.fd in client.timeout_fdis: + let id = client.timeout_fdis[event.fd] + let timeout = client.timeouts[id] + timeout.handler() + client.clearTimeout(id) if client.pager.scommand != "": client.command(client.pager.scommand) client.pager.scommand = "" |