about summary refs log tree commit diff stats
path: root/src/local
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-07 22:15:09 +0200
committerbptato <nincsnevem662@gmail.com>2024-10-07 22:15:09 +0200
commit357f13930ca613fa88d8493e52249dc7be586b48 (patch)
treef37f3adac75671038cfb2ab28d00a279969c61c8 /src/local
parent8edbc32b4f2787dfe968b1f356aac52febf05507 (diff)
downloadchawan-357f13930ca613fa88d8493e52249dc7be586b48.tar.gz
client: fix redirected buffers jumping back to parent on reload
replaceBackup was not being cleared, so the next gotoURL with a replace
pointing to such buffers wouldn't work.
Diffstat (limited to 'src/local')
-rw-r--r--src/local/client.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index 6adc4a53..01688f9e 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -447,6 +447,11 @@ proc acceptBuffers(client: Client) =
     let fd = int(stream.fd)
     client.loader.put(ContainerData(stream: stream, container: container))
     client.pollData.register(fd, POLLIN)
+    # clear replacement references, because we can't fail to load this
+    # buffer anymore
+    container.replaceRef = nil
+    container.replace = nil
+    container.replaceBackup = nil
     pager.handleEvents(container)
   pager.procmap.setLen(0)