chiark / gitweb /
special selection: show details in hint for SPC
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 3 Apr 2021 21:12:52 +0000 (22:12 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Apr 2021 19:07:53 +0000 (20:07 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 7b9dda529241156e09196aabb617c8885087e727..35cfe3adb6065b2d420ac27700c12a1c044ad876 100644 (file)
@@ -342,11 +342,18 @@ function recompute_keybindings() {
     wrc: 'Predictable',
   });
   if (special_count != null) {
+    let desc;
+    if (special_count == 0) {
+      desc = 'select bottommost';
+    } else {
+      desc = `select ${special_count}`;
+    }
+    desc = `cancel <strong style="color:purple">${desc}</strong>`;
     add_uo(null, {
       def_key: 'SPC', // won't match key event; we handle this ad-hoc
       kind: 'ClientExtra',
       opname: 'cancel-special',
-      desc: 'cancel special count',
+      desc: desc,
       wrc: 'Predictable',
     });
   }