summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-27 23:44:44 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-27 23:44:44 +0100
commit5976f8ff00efcb3e155a89346e44f2ad43d2405a (patch)
tree31bff7f7afdc7884dbcee07406e6c575784c16b5 /src/evalfunc.c
parentd385b5d329a6a98539fa21cfb60ed632cd03d544 (diff)
patch 8.1.0648: custom operators can't act upon a forced motionv8.1.0648
Problem: Custom operators can't act upon a forced motion. (Christian Wellenbrock) Solution: Add the forced motion to the mode() result. (Christian Brabandt, closes #3490)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index a29f0ffbec..d94bf8d297 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -8506,7 +8506,11 @@ f_mode(typval_T *argvars, typval_T *rettv)
{
buf[0] = 'n';
if (finish_op)
+ {
buf[1] = 'o';
+ // to be able to detect force-linewise/blockwise/characterwise operations
+ buf[2] = motion_force;
+ }
else if (restart_edit == 'I' || restart_edit == 'R'
|| restart_edit == 'V')
{