From b05e07123895f4f40068bb63d45339c0274c365b Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 25 Oct 2024 22:47:20 +0200 Subject: [PATCH] Properly remove Vi mode when switching to different bindings fish_key_bindings may be set directly or via fish_{default,vi}_key_bindings. The latter use "set --no-event" to simplify their control flow. This (24836f965 (Use set --no-event in the key binding functions, 2023-01-10)) broke Vi mode cleanup, since Vi mode uses a variable hook. Let's update this variable also when using fish_{default,vi}_key_bindings. Another reason to keep this variable in sync is to make the fish_key_bindings handlers working as expected. --- share/functions/__fish_change_key_bindings.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/share/functions/__fish_change_key_bindings.fish b/share/functions/__fish_change_key_bindings.fish index 5997f4c3b..b8512ed9e 100644 --- a/share/functions/__fish_change_key_bindings.fish +++ b/share/functions/__fish_change_key_bindings.fish @@ -1,4 +1,5 @@ function __fish_change_key_bindings --argument-names bindings + set -g __fish_active_key_bindings $bindings # Allow the user to set the variable universally set -l scope set -q fish_key_bindings