chiark / gitweb /
script: Sort targets for keystrokes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Jun 2021 00:07:56 +0000 (01:07 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Jun 2021 00:07:56 +0000 (01:07 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 029cbc8fa070bd69a5f6faca0896b230f471c726..e70f785bf37c0e3c69cd118a4da25e0d4353929f 100644 (file)
@@ -296,6 +296,7 @@ function recompute_keybindings() {
       currently.targets!.push(piece);
     }
   }
+  all_targets.sort(pieceid_z_cmp);
   let add_uo = function(targets: PieceId[] | null, uo: UoDescription) {
     uo_map[uo.def_key] = {
       targets: targets,