From 94c54875ba68e3c78e1a2eda9b07db8fa6f50e23 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 3 Jun 2021 01:07:56 +0100 Subject: [PATCH] script: Sort targets for keystrokes Signed-off-by: Ian Jackson --- templates/script.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/script.ts b/templates/script.ts index 029cbc8f..e70f785b 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -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, -- 2.30.2