Christian Brabandt wrote:
> On Thu, November 7, 2013 03:04, Bram Moolenaar wrote:
> > Christian Brabandt wrote:
> >> ./vim -u NONE -N -c ':set ul=5'
> >> 1):for i in range(1,10)| call feedkeys("o".i."\e", 't')|endfor
> >> (i.e. make sure echo line is a single undoable change).
> >> 2)(undo as long as it is possible, e.g. press u 6 times)
> >> 3)(press o7<esc>)
> > I'm glad you found this problem. But your solution is just working
> > around it. The problem is that when deleting the curbuf->b_u_oldhead
> > branch it actually only deletes one entry. It requires a loop to delete
> > the whole of the branch.
> >
> > I'll make a patch that does it this way. The tests pass, but please
> > check if there isn't a problem that the tests don't cover.
>
> But that means once the complete undo branch is undone and one adds
> another change, one loses all undo information? So after step 3, you
> will only be able to undo exactly step 3 and not get further, although
> the undolevels is at 5?
>
> Well, my attempt wasn't any better. Although my patch preserved the
> undo history, Vim yelled at me with an E438: u_undo: line numbers
> wrong.
Yes, that's exactly the reason the whole branch is dropped, you can't
remove one undo'able change and expect the newer ones to work.
The only other solution would be to be flexible about 'undolevels', keep
a few more changes for a short while. Problem is that it's very
difficult to find the changes to free after that short while.
--
Communication is one of the most compli..., eh, well, it's hard.
You know what I mean. Not?
/// 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/groups/opt_out.