summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-24 20:49:43 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-24 20:49:43 +0200
commite10044015841711b989f9a898d427bcc1fdb4c32 (patch)
tree256dbf4f826bbc408bb1eca2b381c4dc4f953eb6 /src/ops.c
parent5661ed6c833e05467cab33cb9b1c535e7e5cc570 (diff)
downloadvim-git-e10044015841711b989f9a898d427bcc1fdb4c32.tar.gz
patch 8.2.1898: command modifier parsing always uses global cmdmodv8.2.1898
Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ops.c b/src/ops.c
index 99388a60b..5abe151d4 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -204,7 +204,7 @@ op_shift(oparg_T *oap, int curs_top, int amount)
msg_attr_keep((char *)IObuff, 0, TRUE);
}
- if (!cmdmod.lockmarks)
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
// Set "'[" and "']" marks.
curbuf->b_op_start = oap->start;
@@ -943,7 +943,7 @@ op_delete(oparg_T *oap)
msgmore(curbuf->b_ml.ml_line_count - old_lcount);
setmarks:
- if (!cmdmod.lockmarks)
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
if (oap->block_mode)
{
@@ -1216,7 +1216,7 @@ op_replace(oparg_T *oap, int c)
check_cursor();
changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1, 0L);
- if (!cmdmod.lockmarks)
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
// Set "'[" and "']" marks.
curbuf->b_op_start = oap->start;
@@ -1329,7 +1329,7 @@ op_tilde(oparg_T *oap)
// No change: need to remove the Visual selection
redraw_curbuf_later(INVERTED);
- if (!cmdmod.lockmarks)
+ if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
// Set '[ and '] marks.
curbuf->b_op_start = oap->start;
@@ -1942,7 +1942,7 @@ do_join(
#ifdef FEAT_PROP_POPUP
propcount += count_props((linenr_T) (curwin->w_cursor.lnum + t), t > 0);
#endif
- if (t == 0 && setmark && !cmdmod.lockmarks)
+ if (t == 0 && setmark && (cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
// Set the '[ mark.
curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
@@ -2088,7 +2088,7 @@ do_join(
ml_replace_len(curwin->w_cursor.lnum, newp, (colnr_T)newp_len, TRUE, FALSE);
- if (setmark && !cmdmod.lockmarks)
+ if (setmark && (cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
// Set the '] mark.
curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
@@ -2405,7 +2405,7 @@ op_addsub(
// Set '[ mark if something changed. Keep the last end
// position from do_addsub().
- if (change_cnt > 0 && !cmdmod.lockmarks)
+ if (change_cnt > 0 && (cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
curbuf->b_op_start = startpos;
if (change_cnt > p_report)
@@ -2852,7 +2852,7 @@ do_addsub(
--curwin->w_cursor.col;
}
- if (did_change && !cmdmod.lockmarks)
+ if (did_change && (cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
// set the '[ and '] marks
curbuf->b_op_start = startpos;
@@ -3301,7 +3301,7 @@ op_function(oparg_T *oap UNUSED)
(void)call_func_retnr(p_opfunc, 1, argv);
virtual_op = save_virtual_op;
- if (cmdmod.lockmarks)
+ if (cmdmod.cmod_flags & CMOD_LOCKMARKS)
{
curbuf->b_op_start = orig_start;
curbuf->b_op_end = orig_end;