mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-22 06:18:56 +08:00
edit_command_buffer: ignore user remappings for vim
edit_command_buffer uses the "norm" command for moving the cursor to a column with the "|" primitive. The problem is that the user can remap "|". Fix this by using the "norm!" variant which ignores user mappings (see ":h norm"). Closes #8971
This commit is contained in:
parent
15f1b5f368
commit
be781e9144
@ -44,7 +44,7 @@ function edit_command_buffer --description 'Edit the command buffer in an extern
|
|||||||
set -l basename (string match -r '[^/]*$' -- $editor[1])
|
set -l basename (string match -r '[^/]*$' -- $editor[1])
|
||||||
switch $basename
|
switch $basename
|
||||||
case vi vim nvim
|
case vi vim nvim
|
||||||
set -a editor +$line +"norm $col|" $f
|
set -a editor +$line +"norm! $col|" $f
|
||||||
case emacs emacsclient gedit kak
|
case emacs emacsclient gedit kak
|
||||||
set -a editor +$line:$col $f
|
set -a editor +$line:$col $f
|
||||||
case nano
|
case nano
|
||||||
|
Loading…
x
Reference in New Issue
Block a user