diff options
author | vimboss <devnull@localhost> | 2007-10-14 15:16:27 +0000 |
---|---|---|
committer | vimboss <devnull@localhost> | 2007-10-14 15:16:27 +0000 |
commit | 0c243c10a3c4c7f58f527945b161926049bab8e4 (patch) | |
tree | 4e0f51c69ab2ea75625dd466c0beb505a6cb6cf4 /src/normal.c | |
parent | 30b007e2afa8976a12f7dbea6aa63271a0e0c710 (diff) | |
download | vim-0c243c10a3c4c7f58f527945b161926049bab8e4.tar.gz |
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c index fbc430a9..0b19d537 100644 --- a/src/normal.c +++ b/src/normal.c @@ -690,6 +690,13 @@ getcount: ca.count0 = ca.count0 * 10 + (c - '0'); if (ca.count0 < 0) /* got too large! */ ca.count0 = 999999999L; +#ifdef FEAT_EVAL + /* 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()) + set_vcount(ca.count0, ca.count0 == 0 ? 1 : ca.count0); +#endif if (ctrl_w) { ++no_mapping; |