aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.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/diff.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/diff.c')
-rw-r--r--src/nvim/diff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index a622100918..700e79ac75 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -790,14 +790,14 @@ static int diff_write(buf_T *buf, diffin_T *din)
// Always use 'fileformat' set to "unix".
char_u *save_ff = buf->b_p_ff;
buf->b_p_ff = vim_strsave((char_u *)FF_UNIX);
- const bool save_lockmarks = cmdmod.lockmarks;
+ const bool save_cmod_flags = cmdmod.cmod_flags;
// Writing the buffer is an implementation detail of performing the diff,
// so it shouldn't update the '[ and '] marks.
- cmdmod.lockmarks = true;
+ cmdmod.cmod_flags |= CMOD_LOCKMARKS;
int r = buf_write(buf, (char *)din->din_fname, NULL,
(linenr_T)1, buf->b_ml.ml_line_count,
NULL, false, false, false, true);
- cmdmod.lockmarks = save_lockmarks;
+ cmdmod.cmod_flags = save_cmod_flags;
free_string_option(buf->b_p_ff);
buf->b_p_ff = save_ff;
return r;
@@ -1263,7 +1263,7 @@ void ex_diffpatch(exarg_T *eap)
}
// don't use a new tab page, each tab page has its own diffs
- cmdmod.tab = 0;
+ cmdmod.cmod_tab = 0;
if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) {
// Pretend it was a ":split fname" command
@@ -1323,7 +1323,7 @@ void ex_diffsplit(exarg_T *eap)
set_fraction(curwin);
// don't use a new tab page, each tab page has its own diffs
- cmdmod.tab = 0;
+ cmdmod.cmod_tab = 0;
if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) {
// Pretend it was a ":split fname" command