Ctrl+T/Ctrl+X/Ctrl+V actions don't work correctly in some cases when a swap file exists
- Dominant language
- Vim Script
- Stars
- 10.3k
- Forks
- 608
- Avg merge
- 5d 8h
- Merged PRs (30d)
- 2
Description
- [x] I have fzf 0.30.0 or above
- [x] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
- [x] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
- [x] I have read through the manual page of fzf (`man fzf`)
- [x] I have searched through the existing issues
---
Problem exists since https://github.com/vim/vim/commit/c3f91c0648f4b04a6a9ceb4ccec45ea767a63796. Bisected and then checked again by reverting it on the current master branch of vim.
Steps to reproduce:
1. Get yourself a vim v8.2.3833 or newer (I compiled it from source with the default Makefile, so steps assume you are in `vim/src`).
2. Open one instance with `./vim -p beval.c beval.h` (only needed for swap files to exist).
3. Use Ctrl+Z to put it in the background, or open another terminal.
4. Open a new vim instance using minimal configuration.
`vim -Nu <(curl https://gist.githubusercontent.com/junegunn/6936bf79fedd3a079aeb1dd2f3c81ef5/raw) beval.c`
5. In the newly opened instance, confirm opening `beval.c` as read only.
6. Using `:Files` command open second file selected in step (2) - in my case `beval.h`.
Observed result:
It doesn't matter if you choose O, E or R, the new tab or split won't be created.
Although the buffer itself will be opened (visible in `:ls`).
Expected result:
A new tab or split is being created.
---
I don't know enough about the inner workings of vim or fzf.vim to analyze it deeper.
Also, it seems that for this bug to occur, one needs to have one file, which was opened when a swap file existed for it, and then tries to open another file, also with an existing swap file.
As in, it doesn't matter if you try to open two files with swap files one after another, or if you open some other files in between.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.