From 4dd530edb7fbbafb0d2fe549a16886ee91c911b6 Mon Sep 17 00:00:00 2001 From: cage Date: Wed, 2 Mar 2022 21:04:04 +0100 Subject: [PATCH] - remove the root of the keychord tree when hitting :backspace. --- src/command-window.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/command-window.lisp b/src/command-window.lisp index ddcf4a0..211d774 100644 --- a/src/command-window.lisp +++ b/src/command-window.lisp @@ -258,10 +258,12 @@ be either `:keybinding' or `:string'. the former for key command the latter for ((eq :control-right decoded-event) ; suggestion win pagination (move-suggestion-page-right command-window)) ((eq :backspace decoded-event) ; delete last command or char - (when-let ((command-before-last (safe-all-but-last-elt command-line))) + (let ((command-before-last (safe-all-but-last-elt command-line))) (setf command-line nil) - (loop for i in command-before-last do - (enqueue-command command-window i nil)))) + (if command-before-last + (loop for i in command-before-last do + (enqueue-command command-window i nil)) + (win-hide (suggestions-win command-window))))) (t (enqueue-command command-window event t))))))