From 94dfe1b05304b9177f24f3daccefd272798b456c Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:35:37 +0800 Subject: [PATCH] Fix alt-e cursor position restore on Vim <= 8 (#10946) --- share/functions/edit_command_buffer.fish | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/share/functions/edit_command_buffer.fish b/share/functions/edit_command_buffer.fish index 0b942c404..0cee57abd 100644 --- a/share/functions/edit_command_buffer.fish +++ b/share/functions/edit_command_buffer.fish @@ -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