aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-29 01:28:58 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-29 01:28:58 +0200
commitcab49aa0952c24941bcfb9a5b483f796158bf373 (patch)
tree0c3411621c4135279db6d7ea2b5444417b21ce86 /src/buffer
parentf646b6caf0661ab2bee5abb4489267438de27c55 (diff)
downloadchawan-cab49aa0952c24941bcfb9a5b483f796158bf373.tar.gz
Fix double line bug in dump mode
Diffstat (limited to 'src/buffer')
-rw-r--r--src/buffer/container.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim
index 9fdc0a69..04900474 100644
--- a/src/buffer/container.nim
+++ b/src/buffer/container.nim
@@ -905,7 +905,7 @@ proc onreadline(container: Container, w: Slice[int], handle: (proc(line: SimpleF
handle(line)
if res.numLines > w.b + 1:
var w = w
- w.a = w.b
+ w.a += 24
w.b += 24
container.iface.getLines(w).then(proc(res: GetLinesResult) =
container.onreadline(w, handle, res))
@@ -916,7 +916,7 @@ proc onreadline(container: Container, w: Slice[int], handle: (proc(line: SimpleF
proc readLines*(container: Container, handle: (proc(line: SimpleFlexibleLine))) =
if container.code == 0:
# load succeded
- let w = 0 .. 24
+ let w = 0 .. 23
container.iface.getLines(w).then(proc(res: GetLinesResult) =
container.onreadline(w, handle, res))
while container.iface.hasPromises: