From f2c45a7146568bea7eea12270688c8c8ed814c86 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 10 May 2026 13:15:48 -0500 Subject: fix(dirvish): rename pw -> wp to clear quick-access key collision Pressing `g' in dirvish (`dirvish-quick-access') failed with `Wrong type argument: command, (keymap (107 . transient:dirvish-quick-access::N))'. Transient auto-groups multi-character keys into nested prefix keymaps; when one entry's KEY is also the prefix of a longer entry's KEY, the shorter slot resolves to the auto-generated sub-prefix keymap rather than to the intended leaf command. The "wallpaper" entry on `pw' and the "project work" entry on `pwk' (added in 4ece1eb) collided. Rename `pw' to `wp'; `pwk' is now the only entry under the `pw'-prefix, so transient builds a clean leaf. Add `tests/test-dirvish-config-quick-access.el' with five tests: four cover a small `test-dirvish-config--key-collisions' helper against synthetic inputs (collision detected, clean list, empty, single-entry), and one regression test asserts the live `dirvish-quick-access-entries' contains no shorter-key-is-prefix-of-longer-key pair. --- modules/dirvish-config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/dirvish-config.el') diff --git a/modules/dirvish-config.el b/modules/dirvish-config.el index 5f30ba10..fadf09ca 100644 --- a/modules/dirvish-config.el +++ b/modules/dirvish-config.el @@ -268,8 +268,8 @@ Uses feh on X11, swww on Wayland." ("pk" "~/projects/kit/" "project kit") ("pn" "~/projects/nextjob/" "project nextjob") ("ps" ,(concat pix-dir "/screenshots/") "pictures screenshots") - ("pw" ,(concat pix-dir "/wallpaper/") "pictures wallpaper") ("px" ,pix-dir "pictures directory") + ("wp" ,(concat pix-dir "/wallpaper/") "pictures wallpaper") ("rcj" "/sshx:cjennings@cjennings.net:~" "remote c@cjennings.net") ("rtl" "/sshx:cjennings@truenas.local:~" "remote cjennings@truenas.local") ("rtt" "/sshx:cjennings@truenas:~" "remote cjennings@truenas (tailscale)") -- cgit v1.2.3