Think I found a bug in the undo-branches behaviour, which cuts
undo-states. Try this out:
In a new buffer, insert `one' (or some other text), then in normal mode
type `g-g-u', now insert `two' and type `g-g-u' again (ignore quotes
`'). From now on it is not possible to get back the text states `one'
or `two' using `g-' and `g+'.
I know, in both cases `g-g-u' would not be very useful to type, but
sometimes it happens by accident.
Some more examples:
insert `one'
undo
insert `two'
type `g-g-g-u'
insert `three'
result: `g-' can reach `two', but not `one'
Or is this a feature? But then what about:
insert `one'
undo
insert `two'
type `g-g-g-u'
(just like above, but without inserting `three')
result: even `two' cannot be reached (only redo gets it back)
In the following case everything seems ok:
insert `one'
insert `two'
undo
insert `three'
type `g-g-g-g-u'
In short:
- create a branch-off at the root level of the undo tree
- type `g-' until the message `Already at oldest change' occurs
- type `u'
result: damaged undo tree
`:undolist' may still show the branches, but `:u {N}', `g-', `g+' cannot
restore the text.
I'm still using an unpatched Vim7 binary for Win32 (`:ver' says
`compiled May 7 2006'), but searching the patches-README for `undo'
didn't give me a hint about fixes.
Andy
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de