scrooloose / vim-colon-therapy

Handle trailing colons and line numbers in the filename when `:edit`ing
Do What The F*ck You Want To Public License
10 stars 1 forks source link

Preserve jump list when jumping to the real file #6

Closed syyyr closed 5 months ago

syyyr commented 8 months ago

The problem is that using :bwipeout on a buffer that's currently inside in your jump list invalidates the whole jump list. This means that whenever you use vim-colon-therapy to open a file, your jump list won't work.

This patch adds a <C-O> to move back one step in the jump list, before using :edit on the real file, so that the jump list doesn't include the buffer with the line/col number. Using :bwipeout won't invalidate the jump list anymore.

Note: There's no command to move through the jumplist, so :normal! is used instead.