Mercurial > vim
comparison src/session.c @ 23023:4384c44c031a v8.2.2058
patch 8.2.2058: using mkview/loadview changes the jumplist
Commit: https://github.com/vim/vim/commit/3482be6a33c3a00fe1e8e604310ad3034f593045
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 27 11:00:38 2020 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 27 Nov 2020 11:15:06 +0100 |
parents | 7c1e2e3f2d8d |
children | a2f13e56b0e7 |
comparison
equal
deleted
inserted
replaced
23022:feae46642f33 | 23023:4384c44c031a |
---|---|
458 (long)wp->w_cursor.lnum, | 458 (long)wp->w_cursor.lnum, |
459 (long)(wp->w_cursor.lnum - wp->w_topline), | 459 (long)(wp->w_cursor.lnum - wp->w_topline), |
460 (long)wp->w_height / 2, (long)wp->w_height) < 0 | 460 (long)wp->w_height / 2, (long)wp->w_height) < 0 |
461 || put_eol(fd) == FAIL | 461 || put_eol(fd) == FAIL |
462 || put_line(fd, "if s:l < 1 | let s:l = 1 | endif") == FAIL | 462 || put_line(fd, "if s:l < 1 | let s:l = 1 | endif") == FAIL |
463 || put_line(fd, "exe s:l") == FAIL | 463 || put_line(fd, "keepjumps exe s:l") == FAIL |
464 || put_line(fd, "normal! zt") == FAIL | 464 || put_line(fd, "normal! zt") == FAIL |
465 || fprintf(fd, "%ld", (long)wp->w_cursor.lnum) < 0 | 465 || fprintf(fd, "keepjumps %ld", (long)wp->w_cursor.lnum) < 0 |
466 || put_eol(fd) == FAIL) | 466 || put_eol(fd) == FAIL) |
467 return FAIL; | 467 return FAIL; |
468 // Restore the cursor column and left offset when not wrapping. | 468 // Restore the cursor column and left offset when not wrapping. |
469 if (wp->w_cursor.col == 0) | 469 if (wp->w_cursor.col == 0) |
470 { | 470 { |