Fix alt-e cursor position restore on Vim <= 8 (#10946)

Cherry-picked from commit 94dfe1b053
This commit is contained in:
phanium 2024-12-26 13:35:37 +08:00 committed by Johannes Altmanninger
parent e858322749
commit 06105e9207

View file

@ -54,10 +54,7 @@ function edit_command_buffer --description 'Edit the command buffer in an extern
end
set cursor_from_editor (mktemp)
set -a editor +$line "+norm! $col|" $f \
'+autocmd VimLeave * ++once call writefile(
[printf("%s %s %s", shellescape(bufname()), line("."), col("."))],
"'$cursor_from_editor'"
)'
'+au VimLeave * ++once call writefile([printf("%s %s %s", shellescape(bufname()), line("."), col("."))], "'$cursor_from_editor'")'
case emacs emacsclient gedit
set -a editor +$line:$col $f
case kak