0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 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.
This commit is contained in:
Bram Moolenaar
2014-02-11 15:10:43 +01:00
parent c467d9b274
commit 0a36fece92
6 changed files with 122 additions and 77 deletions

View File

@@ -655,8 +655,8 @@ normal_cmd(oap, toplevel)
#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
* 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);
#endif
@@ -736,8 +736,8 @@ getcount:
#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())
* right after the count. Do set it for redo. */
if (toplevel && readbuf1_empty())
set_vcount_ca(&ca, &set_prevcount);
#endif
if (ctrl_w)
@@ -819,8 +819,9 @@ getcount:
#ifdef FEAT_EVAL
/*
* 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);
#endif