Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Avoid error for recursive :redir. #8

Merged
merged 1 commit into from
Aug 13, 2012

Conversation

inkarkat
Copy link
Contributor

The s:CheckSwapFileExists() may be triggered while a command or mapping runs that :redirs itself. Unfortunately, recursive :redir is not allowed, and Vim throws an error, which negatively affects the original command / mapping. This has actually been reported by a user of my EnhancedJumps plugin (vimscript #2695).

Since an occasionally failing swapfile check isn't tragic, let's just suppress the error via :silent!.

The s:CheckSwapFileExists() may be triggered while a command or mapping runs that :redirs itself. Unfortunately, recursive :redir is not allowed, and Vim throws an error, which negatively affects the original command / mapping. This has actually been reported by a user of my EnhancedJumps plugin (vimscript #2695).

Since an occasionally failing swapfile check isn't tragic, let's just suppress the error via :silent!.
@chrisbra
Copy link
Owner

Nice catch, thanks! I'll merge it.

chrisbra added a commit that referenced this pull request Aug 13, 2012
FIX: Avoid error for recursive :redir.
@chrisbra chrisbra merged commit 6ceebb8 into chrisbra:master Aug 13, 2012
@inkarkat inkarkat deleted the swapname-recursive-redir branch May 9, 2014 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants