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:
Johannes Altmanninger 2022-05-26 13:10:06 +02:00
parent 15f1b5f368
commit be781e9144

View File

@ -44,7 +44,7 @@ function edit_command_buffer --description 'Edit the command buffer in an extern
set -l basename (string match -r '[^/]*$' -- $editor[1])
switch $basename
case vi vim nvim
set -a editor +$line +"norm $col|" $f
set -a editor +$line +"norm! $col|" $f
case emacs emacsclient gedit kak
set -a editor +$line:$col $f
case nano