mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 05:12:50 +08:00
Update $fish_cursor_selection_mode in vi/default bindings
Introduced with 3.6.0 `fish_cursor_selection_mode` variable breaks existing vi bindings (for example, input sequence `abc<Esc>0vd` doesn't delete the `a` character as would be expected). This patch fixes it by switching `fish_cursor_selection_mode` to `inclusive` and back.
This commit is contained in:
parent
aa30774b0d
commit
022f42c3cd
|
@ -104,4 +104,6 @@ function fish_default_key_bindings -d "emacs-like key binds"
|
|||
# the following to tell a console to paste:
|
||||
bind --preset $argv \e\x20ep fish_clipboard_paste
|
||||
end
|
||||
|
||||
set -e -g fish_cursor_selection_mode
|
||||
end
|
||||
|
|
|
@ -305,6 +305,7 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
|||
# After executing once, this will have defined functions listening for the variable.
|
||||
# Therefore it needs to be before setting fish_bind_mode.
|
||||
fish_vi_cursor
|
||||
set -g fish_cursor_selection_mode inclusive
|
||||
|
||||
set fish_bind_mode $init_mode
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user