vim-qfedit icon indicating copy to clipboard operation
vim-qfedit copied to clipboard

Quickfix entries in relative path are removed if the quickfix window working dir is different

Open KSR-Yasuda opened this issue 1 year ago • 0 comments

This plugin checks the file existence in quickfix lists on moving in the window.

In searching relative path, the entries can unexpectedly removed.

Repro

Search files for relative path:

:tcd ~/.vim/bundle/vim-qfedit
:e ./
:grep! vim-qfedit **/*.md
:below copen
" +----------------------------------------+
" |                                        |
" | netrw    : at ~/.vim/bundle/vim-qfedit |
" |                                        |
" +----------------------------------------+
" |                                        |
" | quickfix : at ~/.vim/bundle/vim-qfedit |
" |                                        |
" +----------------------------------------+

The quickfix window contents are as below:

README.md|1| # vim-qfedit

Then, change the working dir and grep again:

:1 wincmd w
:e ../
:cd ../
:grep! vim-qfedit **/*.md
" +----------------------------------------+
" |                                        |
" | netrw    : at ~/.vim/bundle            |
" |                                        |
" +----------------------------------------+
" |                                        |
" | quickfix : at ~/.vim/bundle/vim-qfedit |
" |                                        |
" +----------------------------------------+

Then, the quickfix window contents change as below:

vim-qfedit/README.md|1| # vim-qfedit

Now, the quickfix window has different working dir from the grep execution. So, on entering in the quickfix window, the plugin removes the relative path entries.

: wincmd w
" Then, the quickfix win entries disappear.
" From quickfix win working dir `~/.vim/bundle/vim-qfedit`,
" the relative path `vim-qfedit/README.md` does not exist.

KSR-Yasuda avatar Jun 03 '24 03:06 KSR-Yasuda