2
0
Fork 0
mirror of https://github.com/fish-shell/fish-shell synced 2025-01-20 08:54:00 +00:00

bindings: If handler doesn't exist, set immediately

Fixes 
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 # This triggers the handler, which calls us again and ensures the user_key_bindings
# are executed. # are executed.
set fish_key_bindings fish_default_key_bindings 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
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 # This triggers the handler, which calls us again and ensures the user_key_bindings
# are executed. # are executed.
set fish_key_bindings fish_vi_key_bindings 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 end
set -l init_mode insert set -l init_mode insert