diff options
author | oni-link <knil.ino@gmail.com> | 2014-04-05 19:28:33 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-05 20:17:32 -0300 |
commit | f545afaed0304838881930c6a5944f2c6523322e (patch) | |
tree | a062e6bbed491bb0e84fe5f1c7e2d8be606024c7 /src/normal.c | |
parent | 57cd2d661454cd6686c7d98cafa783ea94495fd5 (diff) | |
download | rneovim-f545afaed0304838881930c6a5944f2c6523322e.tar.gz rneovim-f545afaed0304838881930c6a5944f2c6523322e.tar.bz2 rneovim-f545afaed0304838881930c6a5944f2c6523322e.zip |
vim-patch:7.4.171
Problem: Redo does not set v:count and v:count1.
Solution: Use a separate buffer for redo, so that we can set the counts when
performing redo.
https://code.google.com/p/vim/source/detail?r=beb037a6c2708f539d50840637f70eed0811d93c
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 11 |
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); /* |