Mercurial > vim
comparison src/ex_docmd.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 | ec23d84a096d |
children | 75241f4377a4 |
comparison
equal
deleted
inserted
replaced
23022:feae46642f33 | 23023:4384c44c031a |
---|---|
6636 if (eap->cmdidx == CMD_view || eap->cmdidx == CMD_sview) | 6636 if (eap->cmdidx == CMD_view || eap->cmdidx == CMD_sview) |
6637 readonlymode = TRUE; | 6637 readonlymode = TRUE; |
6638 else if (eap->cmdidx == CMD_enew) | 6638 else if (eap->cmdidx == CMD_enew) |
6639 readonlymode = FALSE; // 'readonly' doesn't make sense in an | 6639 readonlymode = FALSE; // 'readonly' doesn't make sense in an |
6640 // empty buffer | 6640 // empty buffer |
6641 setpcmark(); | 6641 if (eap->cmdidx != CMD_balt && eap->cmdidx != CMD_badd) |
6642 setpcmark(); | |
6642 if (do_ecmd(0, (eap->cmdidx == CMD_enew ? NULL : eap->arg), | 6643 if (do_ecmd(0, (eap->cmdidx == CMD_enew ? NULL : eap->arg), |
6643 NULL, eap, | 6644 NULL, eap, |
6644 // ":edit" goes to first line if Vi compatible | 6645 // ":edit" goes to first line if Vi compatible |
6645 (*eap->arg == NUL && eap->do_ecmd_lnum == 0 | 6646 (*eap->arg == NUL && eap->do_ecmd_lnum == 0 |
6646 && vim_strchr(p_cpo, CPO_GOTO1) != NULL) | 6647 && vim_strchr(p_cpo, CPO_GOTO1) != NULL) |