mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.3.1200
Problem: When calling setline() from Insert mode, using CTRL-R =, undo does not work properly. (Israel Chauca) Solution: Sync undo after evaluating the expression. (Christian Brabandt)
This commit is contained in:
parent
dab38d516e
commit
df9259abce
@ -8126,10 +8126,8 @@ ins_reg()
|
|||||||
--no_mapping;
|
--no_mapping;
|
||||||
|
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
/*
|
/* Don't call u_sync() while typing the expression or giving an error
|
||||||
* Don't call u_sync() while getting the expression,
|
* message for it. Only call it explicitly. */
|
||||||
* evaluating it or giving an error message for it!
|
|
||||||
*/
|
|
||||||
++no_u_sync;
|
++no_u_sync;
|
||||||
if (regname == '=')
|
if (regname == '=')
|
||||||
{
|
{
|
||||||
@ -8142,6 +8140,9 @@ ins_reg()
|
|||||||
if (im_on)
|
if (im_on)
|
||||||
im_set_active(TRUE);
|
im_set_active(TRUE);
|
||||||
# endif
|
# endif
|
||||||
|
if (regname == '=')
|
||||||
|
/* sync undo, so the effect of e.g., setline() can be undone */
|
||||||
|
u_sync(TRUE);
|
||||||
}
|
}
|
||||||
if (regname == NUL || !valid_yank_reg(regname, FALSE))
|
if (regname == NUL || !valid_yank_reg(regname, FALSE))
|
||||||
{
|
{
|
||||||
|
@ -84,6 +84,16 @@ ggO---:0put c
|
|||||||
ggO---:0put b
|
ggO---:0put b
|
||||||
ggO---:0put a
|
ggO---:0put a
|
||||||
ggO---:w >>test.out
|
ggO---:w >>test.out
|
||||||
|
:so small.vim
|
||||||
|
:set nocp
|
||||||
|
:enew!
|
||||||
|
oa
|
||||||
|
:set ul=100
|
||||||
|
ob
|
||||||
|
:set ul=100
|
||||||
|
o1a2=setline('.','1234')
|
||||||
|
|
||||||
|
uu:%w >>test.out
|
||||||
:qa!
|
:qa!
|
||||||
ENDTEST
|
ENDTEST
|
||||||
|
|
||||||
|
@ -41,3 +41,6 @@ one one one
|
|||||||
two
|
two
|
||||||
two
|
two
|
||||||
three
|
three
|
||||||
|
|
||||||
|
a
|
||||||
|
b
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1200,
|
||||||
/**/
|
/**/
|
||||||
1199,
|
1199,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user