about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-27 17:43:55 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-27 17:43:55 +0200
commit4973bdb1dad910a5653b7e7aefa1e311728c4ce7 (patch)
treeb5ebf54e15fdaa65fddde190ff87cf184fa04cc9
parent3f5135204c0902e2123194e0319fda7afd57bd81 (diff)
downloadchawan-4973bdb1dad910a5653b7e7aefa1e311728c4ce7.tar.gz
config: fix copy image URL, document copy commands
-rw-r--r--doc/cha-config.518
-rw-r--r--doc/config.md15
-rw-r--r--res/config.toml2
3 files changed, 34 insertions, 1 deletions
diff --git a/doc/cha-config.5 b/doc/cha-config.5
index c5b71eba..b95bf9dc 100644
--- a/doc/cha-config.5
+++ b/doc/cha-config.5
@@ -1268,6 +1268,24 @@ T}@T{
 Save the source of the current buffer to the disk.
 T}@T{
 T}
+T{
+\f[V]cmd.pager.copyURL\f[R]
+T}@T{
+Copy the current buffer\[cq]s URL to the system clipboard.
+T}@T{
+T}
+T{
+\f[V]cmd.pager.copyCursorLink\f[R]
+T}@T{
+Copy the link under the cursor to the system clipboard.
+T}@T{
+T}
+T{
+\f[V]cmd.pager.copyCursorImage\f[R]
+T}@T{
+Copy the URL of the image under the cursor to the system clipboard.
+T}@T{
+T}
 .TE
 .SS Line-editing actions
 .PP
diff --git a/doc/config.md b/doc/config.md
index 4c2814fd..d2f75752 100644
--- a/doc/config.md
+++ b/doc/config.md
@@ -1045,6 +1045,21 @@ position.</td>
 <td>Save the source of the current buffer to the disk.</td>
 </tr>
 
+<tr>
+<td>`cmd.pager.copyURL`</td>
+<td>Copy the current buffer's URL to the system clipboard.</td>
+</tr>
+
+<tr>
+<td>`cmd.pager.copyCursorLink`</td>
+<td>Copy the link under the cursor to the system clipboard.</td>
+</tr>
+
+<tr>
+<td>`cmd.pager.copyCursorImage`</td>
+<td>Copy the URL of the image under the cursor to the system clipboard.</td>
+</tr>
+
 </table>
 
 
diff --git a/res/config.toml b/res/config.toml
index fe1d6963..a33b187b 100644
--- a/res/config.toml
+++ b/res/config.toml
@@ -26,7 +26,7 @@ copyCursorLink = '''
 		pager.alert("Failed to copy URL to clipboard. (Is xsel installed?)");
 }
 '''
-yankCursorImage = '''
+copyCursorImage = '''
 () => {
 	const link = pager.hoverImage;
 	if (!link)
b149a93'>^
1e858c87 ^



4b482418 ^

1e858c87 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66