about summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-09 20:45:59 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-09 20:46:52 +0100
commit4ee1a937fad792654277a1eedd35bd0c4f8389c6 (patch)
tree902128394320b4c666d5bac73df64aa89092f5d6 /doc
parent4aa3e24199f0aac97d5541adcbf1ae137f7b64f0 (diff)
downloadchawan-4ee1a937fad792654277a1eedd35bd0c4f8389c6.tar.gz
pager: add marks
Default is vi-style, but w3m-style marks work as well; see
bonus/w3m.toml.
Diffstat (limited to 'doc')
-rw-r--r--doc/config.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/doc/config.md b/doc/config.md
index 0b017f1c..a1bb2a41 100644
--- a/doc/config.md
+++ b/doc/config.md
@@ -374,6 +374,12 @@ accepted.</td>
 </tr>
 
 <tr>
+<td>highlight-marks</td>
+<td>boolean</td>
+<td>Enable/disable highlighting of marks.</td>
+</tr>
+
+<tr>
 <td>double-width-ambiguous</td>
 <td>boolean</td>
 <td>Assume the terminal displays characters in the East Asian Ambiguous
@@ -1017,6 +1023,56 @@ q = 'pager.ask("Do you want to exit Chawan?").then(x => x ? pager.quit() : void(
 </tr>
 
 <tr>
+<td>`pager.askChar(prompt)`</td>
+<td>Ask the user for any character.<br>
+Like `pager.ask`, but the return value is a character.</td>
+</tr>
+
+<tr>
+<td>`pager.setMark(id, x = pager.cursorx, y = pager.cursory)`</td>
+<td>Set a mark at (x, y) using the name `id`.<br>
+Returns true if no other mark exists with `id`. If one already exists,
+it will be overridden and the function returns false.</td>
+</tr>
+
+<tr>
+<td>`pager.clearMark(id)`</td>
+<td>Clear the mark with the name `id`. Returns true if the mark existed,
+false otherwise.</td>
+</tr>
+
+<tr>
+<td>`pager.gotoMark(id)`</td>
+<td>If the mark `id` exists, jump to its position and return true. Otherwise,
+do nothing and return false.</td>
+</tr>
+
+<tr>
+<td>`pager.gotoMarkY(id)`</td>
+<td>If the mark `id` exists, jump to its Y position and return true. Otherwise,
+do nothing and return false.</td>
+</tr>
+
+<tr>
+<td>`pager.getMarkPos(id)`</td>
+<td>If the mark `id` exists, return its position as an array where the
+first element is the X position and the second element is the Y position.
+If the mark does not exist, return null.</td>
+</tr>
+
+<tr>
+<td>`pager.findNextMark(x = pager.cursorx, y = pager.cursory)`</td>
+<td>Find the next mark after `x`, `y`, if any; and return its id (or null
+if none were found.)</td>
+</tr>
+
+<tr>
+<td>`pager.findPrevMark(x = pager.cursorx, y = pager.cursory)`</td>
+<td>Find the previous mark before `x`, `y`, if any; and return its id (or null
+if none were found.)</td>
+</tr>
+
+<tr>
 <td>`pager.extern(cmd, options = {setenv: true, suspend: true, wait: false})`
 </td>
 <td>Run an external command `cmd`. The `$CHA_URL` and `$CHA_CHARSET` variables