On Sat, May 1, 2010 at 8:20 AM, Christian Brabandt <[email protected]>wrote:

> Thanks for letting me know. Today it's the first time I tested this
> feature. This is really awesome and I have been missing it so much. I
> already started testing it. There are some issues I already noticed:
>
>     1) This does not work very well with files that are symlinked. If
>        you start by editing a symlink file, the undo will be saved and
>        remembered only for the symlink. If you are later start editing
>        the symlink target, there won't be any undo-state remembered and
>        further you are loosing your old remembered undo points (because
>        even if you later again start editing the symlink file, you
>        won't be able to undo changes.
>

This should be a relatively easy fix, if the desired behavior is to have all
of the symlinks associate to the same undo file as the target. Same story
for hard links.


>
>    2)  What happens with old undo files? They seem to accumulate and
>        it seems that sooner or later you'll have in ~/.vim/undo/ a bunch
>        of unusable undo files. Could they be deleted automatically,
>        when they become unusable or is there a way to force reading the
>        undo-file?
>

This is kind of a tricky problem - the only way Vim will notice when an undo
file becomes unusable is if a user edits the file its associated with. But
then presumably the user will soon write another fresh undo file for the
file that was just opened, so there wouldn't actually be any pruning unless
the user just opens and closes the file without writing out a new undo file.

I suppose it wouldn't be hard to write a cleanup function that would iterate
through the whole undo directory and delete those which are out of date or
whose associated file no longer exists. Would that be useful?


>
>    3)  :rundo should at least output some message, if it can't restore
>        the undo points from a previous session, since the file has been
>        modified by some other program.
>

When I first wrote this patch, an error message for this was printed both
for explicit and implicit :rundo (implicit being when undofile is set in the
vimrc, and the undo file is automatically loaded). Some testers were peeved
by error messages popping up indicating outdated undo files for the
automatic undo file load, so I removed them unless the verbose mode was
greater than 0. But it makes sense to display the messages for explicit
:rundo always; I will make that change.


> I'll keep on testing it.


Thanks for your work!

- Jordan

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

Raspunde prin e-mail lui