Rick Howe wrote:

> I have found a strange behavior on patch 8.1.256 and still now.
> 
> When I set this:
> function! UndoRedo()
>       silent noautocmd undo
>       silent noautocmd redo
> endfunction
> autocmd! InsertLeave * call UndoRedo()
> 
> :new
> :set cpo&vim
> enter text like
> <i>111<Esc>
> :echo changenr()
> returns 2, not 1.
> :undo
> does not clear text, and
> :echo changenr()
> returns 1. Again,
> :undo
> clears text, and
> :echo changenr()
> returns 0.
> 
> On patch 8.1.255:
> :new
> :set cpo&vim
> enter text like
> <i>111<Esc>
> :echo changenr()
> returns 1.
> :undo
> clears text, and
> :echo changenr()
> returns 0.
> 
> If I use TextChanged instead of InsertLeave, it works same and fine on both 
> patches.
> 
> My plugin has a similar event settings and does not work on 8.1.256.

It's expected that the patch slightly changes undo behavior, especially
if you do something weird like using undo in an autocommand.  The change
is needed to avoid corruption of undo.

So it's different, but why would it be wrong or bad?

-- 
hundred-and-one symptoms of being an internet addict:
159. You get excited whenever discussing your hard drive.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui