-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fzf vim plugin prompting when swp file exists but open the file as empty in error #2895
Comments
Yes, that's the intended behavior. See c4e5ee6
I can't reproduce the problem.
Probably. Can you check if you still have the issue with the following minimal vimrc? vim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw) (https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw) |
Using that minimal vimrc, it does successfully open a file which has swp file. But there is no SwapExists prompting and the file is not opened in readonly mode. Is that expected? I tried manually commenting out my other plugins, then fzf behaves as expected by prompting and opening the file in readonly mode. So it is my other plugins that's the problem. Closing this issue as the "more than 1 file" check is intended behavior. |
It seems the problem is the coc.nvim plugin. Don't really know how it interacts with fzf and causes this bug though. |
I have exactly the same issue, it seems to be caused by vim-airline in my case. |
man fzf
)Info
Problem / Steps to reproduce
I'm still experiencing issues similar to #1365 when opening a file whose swp file already exists, but the behavior is different in that there is prompting but after choosing the option, the file is opened as empty and results in error state.
:ls
givesx
flag on that buffer.I guess the error may come from here:
fzf/plugin/fzf.vim
Lines 306 to 316 in ecc418b
The action key outputted at first line from fzf has been removed at line 306, but line 311 is still checking if
a:lines
's length is greater than 1. Thus when selecting only 1 file, theaugroup
definition is skipped and prompting is showed to ask user for aswapchoice
. However I don't know why after manually giving the choice, the file is opened in error state (maybe because of my other plugins).Having tried commenting out the greater than 1 check, file can be opened successfully in read only mode.
The text was updated successfully, but these errors were encountered: