aboutsummaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/normal.c b/src/normal.c
index 358dfea075..b3ba4ff77c 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -572,8 +572,8 @@ normal_cmd (
/* Set v:count here, when called from main() and not a stuffed
* command, so that v:count can be used in an expression mapping
- * when there is no count. */
- if (toplevel && stuff_empty())
+ * when there is no count. Do set it for redo. */
+ if (toplevel && readbuf1_empty())
set_vcount_ca(&ca, &set_prevcount);
/*
@@ -637,8 +637,8 @@ getcount:
ca.count0 = 999999999L;
/* Set v:count here, when called from main() and not a stuffed
* command, so that v:count can be used in an expression mapping
- * right after the count. */
- if (toplevel && stuff_empty())
+ * right after the count. Do set it for redo. */
+ if (toplevel && readbuf1_empty())
set_vcount_ca(&ca, &set_prevcount);
if (ctrl_w) {
++no_mapping;
@@ -705,8 +705,9 @@ getcount:
/*
* Only set v:count when called from main() and not a stuffed command.
+ * Do set it for redo.
*/
- if (toplevel && stuff_empty())
+ if (toplevel && readbuf1_empty())
set_vcount(ca.count0, ca.count1, set_prevcount);
/*