aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_session.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2020-12-07 20:10:58 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2021-02-11 19:00:55 +0000
commitadd0cf9a42a5122d74d0b89301802ba10bef802b (patch)
treebdf89f8ab3ab44a240c10a50fac13affac210f96 /src/nvim/ex_session.c
parentd9dd360d2aff7d3e1580367692c83fcd3647a439 (diff)
downloadrneovim-add0cf9a42a5122d74d0b89301802ba10bef802b.tar.gz
rneovim-add0cf9a42a5122d74d0b89301802ba10bef802b.tar.bz2
rneovim-add0cf9a42a5122d74d0b89301802ba10bef802b.zip
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) https://github.com/vim/vim/commit/3482be6a33c3a00fe1e8e604310ad3034f593045 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.
Diffstat (limited to 'src/nvim/ex_session.c')
-rw-r--r--src/nvim/ex_session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c
index f6fd6df5ad..4915070e91 100644
--- a/src/nvim/ex_session.c
+++ b/src/nvim/ex_session.c
@@ -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),