Skip to content

Fix issue with dangling swap files #4

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

Merged
merged 1 commit into from
May 6, 2020

Conversation

LunarWatcher
Copy link
Contributor

This fixes an issue where an instance of Vim, for whatever reason, is closed and leaves behind a swap file. This mainly happens if the editor is force-closed, but there's proabably more explanations. These swap files may contain content worth recovering, but it also blocks that file from being edited entirely. The previous version assumed it existed, which isn't always the case.

This PR mitigates that with a single try-catch to see if the remote is set to the default value or not. If it is, it returns and lets the built-in swap flow continue as normal.

@codeape2 codeape2 merged commit 312ea21 into codeape2:master May 6, 2020
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