diff options
author | bptato <nincsnevem662@gmail.com> | 2023-01-02 00:45:18 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-01-02 00:45:18 +0100 |
commit | 9edd436512aabd6db54acf154735f6d2ed814a8b (patch) | |
tree | 5f4d9925861d649065653965c22558a48de97a13 /src | |
parent | 788ba39b6e5ce9d72956dbc451e9cad87d03b11e (diff) | |
download | chawan-9edd436512aabd6db54acf154735f6d2ed814a8b.tar.gz |
Fix connection load info not being shown
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer/container.nim | 2 | ||||
-rw-r--r-- | src/display/client.nim | 7 | ||||
-rw-r--r-- | src/display/pager.nim | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim index a42422e5..570dbce8 100644 --- a/src/buffer/container.nim +++ b/src/buffer/container.nim @@ -669,7 +669,7 @@ proc onload(container: Container, res: LoadResult) = container.setCursorXY(res.x, res.y)) proc load(container: Container) = - container.setLoadInfo("Connecting to " & $container.source.location & "...") + container.setLoadInfo("Connecting to " & $container.source.location) container.iface.connect().then(proc(res: ConnectResult): auto = let info = container.loadinfo if res.code != -2: diff --git a/src/display/client.nim b/src/display/client.nim index 0a1f131c..bc316946 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -48,7 +48,6 @@ type console {.jsget.}: Console pager {.jsget.}: Pager line {.jsget.}: LineEdit - sevent: seq[Container] config {.jsget.}: Config jsrt: JSRuntime jsctx: JSContext @@ -267,7 +266,11 @@ proc acceptBuffers(client: Client) = let fd = stream.source.getFd() client.fdmap[int(fd)] = container client.selector.registerHandle(fd, {Read}, nil) - client.sevent.add(container) + if not client.pager.handleEvents(container): + client.quit(1) + if container == client.pager.container: + client.pager.showAlerts() + client.pager.draw() else: #TODO uh what? eprint "???" diff --git a/src/display/pager.nim b/src/display/pager.nim index 3ba54032..4ffd2900 100644 --- a/src/display/pager.nim +++ b/src/display/pager.nim @@ -266,7 +266,7 @@ proc refreshStatusMsg*(pager: Pager) = if container == nil: return if pager.tty == nil: return if container.loadinfo != "": - pager.alerton = true + pager.alerton = false pager.writeStatusMessage(container.loadinfo) elif pager.alerts.len > 0: pager.alerton = true |