mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
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
This commit is contained in:

committed by
Thiago de Arruda

parent
57cd2d6614
commit
f545afaed0
11
src/normal.c
11
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);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user