mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
vim-patch:8.2.2058: using mkview/loadview changes the jumplist
Problem: Using mkview/loadview changes the jumplist.
Solution: Use ":keepjumps". Don't let ":badd" or ":balt" change the
jumplist. (closes vim/vim#7371)
3482be6a33
Definition for BufWinEnter autocmd in Test_mkview_loadview_jumplist()
was moved down a few lines until after the views are written, as in
Nvim, :loadview throws if the view file can't be opened.
This commit is contained in:
@@ -449,9 +449,9 @@ static int put_view(
|
||||
"let s:l = %" PRId64 " - ((%" PRId64
|
||||
" * winheight(0) + %" PRId64 ") / %" PRId64 ")\n"
|
||||
"if s:l < 1 | let s:l = 1 | endif\n"
|
||||
"exe s:l\n"
|
||||
"keepjumps exe s:l\n"
|
||||
"normal! zt\n"
|
||||
"%" PRId64 "\n",
|
||||
"keepjumps %" PRId64 "\n",
|
||||
(int64_t)wp->w_cursor.lnum,
|
||||
(int64_t)(wp->w_cursor.lnum - wp->w_topline),
|
||||
(int64_t)(wp->w_height_inner / 2),
|
||||
|
Reference in New Issue
Block a user