chiark / gitweb /
movehist: Provide key for adjusting
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 2 Apr 2021 20:48:31 +0000 (21:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 2 Apr 2021 23:04:52 +0000 (00:04 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 478a1accda85061ac28f2a78acd41efd7a9c9786..5e5069658f844ccd6fb8f4e12f29162ed40681c4 100644 (file)
@@ -340,6 +340,13 @@ function recompute_keybindings() {
     desc: wresting ? 'Exit wresting mode' : 'Enter wresting mode',
     wrc: 'Predictable',
   });
+  add_uo(null, {
+    def_key: 'h',
+    kind: 'ClientExtra',
+    opname: 'motion-hint-history',
+    desc: 'Recent history display',
+    wrc: 'Predictable',
+  });
   var uo_keys = Object.keys(uo_map);
   uo_keys.sort(function (ak,bk) {
     let a = uo_map[ak]!;
@@ -649,6 +656,12 @@ keyops_local['wrest'] = function (uo: UoRecord) {
   recompute_keybindings();
 }
 
+keyops_local['motion-hint-history'] = function (uo: UoRecord) {
+  movehist_len_i ++;
+  movehist_len_i %= movehist_lens.length;
+  movehist_revisible();
+}
+
 keyops_local['pin'  ] = function (uo) {
   if (!lower_targets(uo)) return;
   pin_unpin(uo, true);