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 #7371)
diff --git a/src/session.c b/src/session.c
index 9731bd3..d0373bb 100644
--- a/src/session.c
+++ b/src/session.c
@@ -460,9 +460,9 @@
(long)wp->w_height / 2, (long)wp->w_height) < 0
|| put_eol(fd) == FAIL
|| put_line(fd, "if s:l < 1 | let s:l = 1 | endif") == FAIL
- || put_line(fd, "exe s:l") == FAIL
+ || put_line(fd, "keepjumps exe s:l") == FAIL
|| put_line(fd, "normal! zt") == FAIL
- || fprintf(fd, "%ld", (long)wp->w_cursor.lnum) < 0
+ || fprintf(fd, "keepjumps %ld", (long)wp->w_cursor.lnum) < 0
|| put_eol(fd) == FAIL)
return FAIL;
// Restore the cursor column and left offset when not wrapping.