stefandtw / quickfix-reflector.vim

Change code right in the quickfix window
MIT License
347 stars 18 forks source link

Problem using quickfix-reflector with tabs #19

Closed leonschreuder closed 7 years ago

leonschreuder commented 7 years ago

When I'm building something, and decide I want to refactor by renaming some variable for example, I usually do a vimgrep to the word under cursor, which opens the qf-window and then with the quickfix-reflector I can do a search and replace right there in the qf-window. This resembles the refactoring functionality of an IDE and works fantastic.

However, I often have multiple tabs opened to several source files. Vimgrep, search&replace work fine, but if I then write the buffer with :wq something strange happens: the changes get applied, but I get immediately switched to the next tab. When I go back to the tab I was working in, the qf-window is still opened, but appears to not be saved even though the changes where applied correctly. If I then try to save again, the screen gets filled with error messages. I have to force-close the window with :q!.

Can you please take a look at this?

stefandtw commented 7 years ago

Should be fixed now.

leonschreuder commented 7 years ago

Hahaha, you made a test describing my use-case exactly.

And it works! Thanks a lot for the quick fix!