aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-13 20:20:34 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-06-14 20:58:34 +0800
commit6130b4a84b41b71f4c0c58093a29585c6c67ff16 (patch)
tree021564ddd896004b20ebaf2f3686e18c1b6be201 /src/nvim/mark.c
parentdad898b665b77feaec57acc2812faa7ff0ab619e (diff)
downloadrneovim-6130b4a84b41b71f4c0c58093a29585c6c67ff16.tar.gz
rneovim-6130b4a84b41b71f4c0c58093a29585c6c67ff16.tar.bz2
rneovim-6130b4a84b41b71f4c0c58093a29585c6c67ff16.zip
vim-patch:8.2.1898: command modifier parsing always uses global cmdmod
Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index 7b7441ebcf..8d1a917600 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -171,7 +171,7 @@ void setpcmark(void)
xfmark_T *fm;
// for :global the mark is set only once
- if (global_busy || listcmd_busy || cmdmod.keepjumps) {
+ if (global_busy || listcmd_busy || (cmdmod.cmod_flags & CMOD_KEEPJUMPS)) {
return;
}
@@ -990,7 +990,7 @@ static void mark_adjust_internal(linenr_T line1, linenr_T line2, linenr_T amount
return;
}
- if (!cmdmod.lockmarks) {
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) {
// named marks, lower case and upper case
for (i = 0; i < NMARKS; i++) {
ONE_ADJUST(&(curbuf->b_namedm[i].mark.lnum));
@@ -1059,7 +1059,7 @@ static void mark_adjust_internal(linenr_T line1, linenr_T line2, linenr_T amount
* Adjust items in all windows related to the current buffer.
*/
FOR_ALL_TAB_WINDOWS(tab, win) {
- if (!cmdmod.lockmarks) {
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) {
// Marks in the jumplist. When deleting lines, this may create
// duplicate marks in the jumplist, they will be removed later.
for (i = 0; i < win->w_jumplistlen; i++) {
@@ -1070,7 +1070,7 @@ static void mark_adjust_internal(linenr_T line1, linenr_T line2, linenr_T amount
}
if (win->w_buffer == curbuf) {
- if (!cmdmod.lockmarks) {
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) {
// marks in the tag stack
for (i = 0; i < win->w_tagstacklen; i++) {
if (win->w_tagstack[i].fmark.fnum == fnum) {
@@ -1159,7 +1159,7 @@ void mark_col_adjust(linenr_T lnum, colnr_T mincol, linenr_T lnum_amount, long c
int fnum = curbuf->b_fnum;
pos_T *posp;
- if ((col_amount == 0L && lnum_amount == 0L) || cmdmod.lockmarks) {
+ if ((col_amount == 0L && lnum_amount == 0L) || (cmdmod.cmod_flags & CMOD_LOCKMARKS)) {
return; // nothing to do
}
// named marks, lower case and upper case