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

This commit is contained in:
phanium 2024-12-26 13:35:37 +08:00 committed by GitHub
parent 0b52b72ebc
commit 94dfe1b053
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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