Hello.
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.

-- 
-- 
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