bindings: If handler doesn't exist, set immediately

Fixes #9443
This commit is contained in:
Fabian Boehm 2023-01-02 21:43:46 +01:00
parent 5e0f9521a5
commit d2f5daf8e8
2 changed files with 8 additions and 2 deletions

View file

@ -14,7 +14,10 @@ function fish_default_key_bindings -d "emacs-like key binds"
# This triggers the handler, which calls us again and ensures the user_key_bindings
# are executed.
set fish_key_bindings fish_default_key_bindings
return
# unless the handler somehow doesn't exist, which would leave us without bindings.
# this happens in no-config mode.
functions -q __fish_reload_key_bindings
and return
end
end

View file

@ -28,7 +28,10 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
# This triggers the handler, which calls us again and ensures the user_key_bindings
# are executed.
set fish_key_bindings fish_vi_key_bindings
return
# unless the handler somehow doesn't exist, which would leave us without bindings.
# this happens in no-config mode.
functions -q __fish_reload_key_bindings
and return
end
set -l init_mode insert