Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Properly pass filename to `:wundo`. #6

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

blueyed commented Dec 6, 2011

Also, do not catch any error, but display them as is.

Closes #5.

Owner

chrisbra commented Dec 6, 2011

I think you need to explicitly read the undofile using :rundo since vim will refuse to use an undofile where the owner differs with the original file. That looks a little bit like a bug, that vim will discard that info (you can see it, if you start vim with -v1 or something like this)

Contributor

blueyed commented Dec 6, 2011

@chrisbra: so are you adding the call to :rundo, too?
@seanfarley: can you confirm that :rundo is needed in your case?

You are correct about the :rundo. This fixes it. I agree that this is bug for vim (why not open the undo file if it exists, regardless of owner?)

Barring patching vim, would it be possible to get around this using an augroup filetype call? Or maybe just add it to SudoRead? (I'd really like SudoRead to be called on [RO] files by default when they are opened)

Contributor

blueyed commented Dec 6, 2011

I am closing this pull request to avoid any confusion.

@seanfarley or @chrisbra: do you feel like report this requirement of explicit :rundo as a bug to Vim?

@blueyed blueyed closed this Dec 6, 2011

I am not sure, this is the right approach. The temporary settings should still be set back to their original values.

Owner

chrisbra commented Dec 6, 2011

It is not a bug, but there is still a bug in Vim. See the thread here:
http://groups.google.com/group/vim_dev/browse_frm/thread/1539024ed00dd2e2

BTW: I have already implemented a work around for that issue in commit f2b976f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment