diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-15 18:59:18 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-15 18:59:18 +0100 |
commit | f0de405c6614356928d8700e2e95d00d97ffe2f9 (patch) | |
tree | 09c20a94ad68c9cf9a53084925a52fc93279d03c /src/buffer | |
parent | 4cd5832ec1bfd02e8afdf5777546cadbe5eaaafb (diff) | |
download | chawan-f0de405c6614356928d8700e2e95d00d97ffe2f9.tar.gz |
Fix console display bugs, add container.location
Diffstat (limited to 'src/buffer')
-rw-r--r-- | src/buffer/container.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim index 7a3534be..85c3b9e8 100644 --- a/src/buffer/container.nim +++ b/src/buffer/container.nim @@ -115,6 +115,9 @@ proc newBuffer*(dispatcher: Dispatcher, config: BufferConfig, istream.sread(result.process) result.pos.setx = -1 +func location*(container: Container): URL {.jsfunc.} = + container.source.location + func lineLoaded(container: Container, y: int): bool = return y - container.lineshift in 0..container.lines.high @@ -271,7 +274,7 @@ proc setNumLines(container: Container, lines: int, finish = false) = container.updateCursor() container.triggerEvent(STATUS) -proc requestLines*(container: Container, w = container.lineWindow) = +proc requestLines*(container: Container, w = container.lineWindow): auto {.discardable.} = container.iface.getLines(w).then(proc(res: tuple[numLines: int, lines: seq[SimpleFlexibleLine]]) = container.lines.setLen(w.len) container.lineshift = w.a |