diff options
author | bptato <nincsnevem662@gmail.com> | 2024-02-26 17:06:46 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-02-26 17:13:04 +0100 |
commit | d74933cf04e79e08f3623c6dd1c112fa26a7a4df (patch) | |
tree | 28f7b49fdcf72c4d377fe51a3f6bc2c4984d9ef1 /src/local/client.nim | |
parent | 973e8f942855fe9a17f0245948984bf9841f9ffa (diff) | |
download | chawan-d74933cf04e79e08f3623c6dd1c112fa26a7a4df.tar.gz |
buffer: clean up onload, fix console update
* reduce onload result size to a single int * clean up mess that was the container onload handler This fixes automatic refresh in console. Before, the client would only request a screen update after receiving the number of bytes read, but before the screen was actually reshaped (which obviously resulted in a race condition). Now, "I've reshaped the document" is a separate response (and is the only occasion where the screen is updated before the final render).
Diffstat (limited to 'src/local/client.nim')
-rw-r--r-- | src/local/client.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/local/client.nim b/src/local/client.nim index d088982f..11b3a8f2 100644 --- a/src/local/client.nim +++ b/src/local/client.nim @@ -144,8 +144,7 @@ proc command0(client: Client, src: string, filename = "<command>", proc command(client: Client, src: string) = client.command0(src) let container = client.consoleWrapper.container - container.requestLines().then(proc() = - container.cursorLastLine()) + container.tailOnLoad = true proc suspend(client: Client) {.jsfunc.} = client.pager.term.quit() |