From 52241712b49d38f7fe171e090b752a6063bb0055 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 15 Oct 2025 09:16:18 +0200 Subject: [PATCH] fish_vi_key_bindings: hack to prevent error when overriding fish_vi_cursor As discovered in https://matrix.to/#/!YLTeaulxSDauOOxBoR:matrix.org/$BFAjMPXBA9UczLT8h-7XpiyGUDv0Cz5g6ijbgdEVl_w --- share/functions/fish_vi_key_bindings.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index 4cde94038..910e1532e 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -427,9 +427,11 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' end end function __fish_vi_key_bindings_remove_handlers --on-variable __fish_active_key_bindings - __fish_vi_cursor fish_cursor_default functions --erase __fish_vi_key_bindings_remove_handlers functions --erase __fish_vi_key_bindings_on_mode_change + if type -q __fish_vi_cursor + __fish_vi_cursor fish_cursor_default + end functions --erase fish_vi_cursor_handle functions --erase fish_vi_cursor_handle_preexec set -e -g fish_cursor_end_mode