diff options
author | bptato <nincsnevem662@gmail.com> | 2023-12-09 14:43:10 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-12-09 16:36:23 +0100 |
commit | 6a1b1a2edfc6adf3d1d1a1aaa2c9fd95eccc8ff7 (patch) | |
tree | f2760bbb12b79925fa1c87dde9e05ddd74310683 /src/local | |
parent | 14f5605061501fa56d9b4970571858f6451e4710 (diff) | |
download | chawan-6a1b1a2edfc6adf3d1d1a1aaa2c9fd95eccc8ff7.tar.gz |
pager: add `{', `}'; document externInto
{ & } acts like in vi (except the cursor is not moved to the line beginning). No reason to leave externInto undocumented, as it is even used in the default config.
Diffstat (limited to 'src/local')
-rw-r--r-- | src/local/container.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/local/container.nim b/src/local/container.nim index 2a0051e6..7cb67862 100644 --- a/src/local/container.nim +++ b/src/local/container.nim @@ -850,6 +850,20 @@ proc cursorPrevLink*(container: Container) {.jsfunc.} = if res.x > -1 and res.y != -1: container.setCursorXYCenter(res.x, res.y)) +proc cursorNextParagraph*(container: Container, n = 1) {.jsfunc.} = + container.iface + .findNextParagraph(container.cursory, n) + .then(proc(res: int) = + container.setCursorY(res) + ) + +proc cursorPrevParagraph*(container: Container, n = 1) {.jsfunc.} = + container.iface + .findPrevParagraph(container.cursory, n) + .then(proc(res: int) = + container.setCursorY(res) + ) + proc cursorNthLink*(container: Container, n = 1) {.jsfunc.} = container.iface .findNthLink(n) |