fidget.nvim icon indicating copy to clipboard operation
fidget.nvim copied to clipboard

Closing windows blocks because of floating window

Open ctranstrum opened this issue 3 years ago • 6 comments

Thanks for this project; I really love the feedback on my LSP server tasks.

One little minor problem I've noticed. In my workflow, I will often run format and then save and then quit in quick succession. If I do the whole process really quickly, I often catch LSP still working on diagnostics when I try to quit, and since the fidget is in a floating window, neovim can't figure out how to close my buffer window while the floating window is still above it, so it gives me an error message E5601: Cannot close window, only floating window would remain.

Reproduce: open two tabs that have a diagnostics server. In tab one, reformat, save, and quickly close the tab.

Workaround: wait until the LSP tasks are completed, then close the tab.

I understand this is an issue that is probably better fixed in neovim, but maybe if there were a quick command to close fidget's floating window (that doesn't error if the window is already closed), then I could just add that to my save-and-quit keymap. Does something like that exist already and I just can't find it? If not, is it possible to add?

ctranstrum avatar Jan 28 '22 23:01 ctranstrum

My pleasure! Sorry it's causing these weird bugs.

I'll try to look into reproducing this when I get the chance. In the meantime, #4 might have been related; could you try updating to the latest commit, and see if you still have this issue?

j-hui avatar Jan 30 '22 04:01 j-hui

Thanks for looking into this. It doesn't appear to be related to that issue. After updating to the latest commit, I am still seeing the same behavior.

ctranstrum avatar Jan 30 '22 15:01 ctranstrum

https://github.com/neovim/neovim/pull/14387

levouh avatar Feb 01 '22 16:02 levouh

neovim/neovim#14387 seems to have been superceded by https://github.com/neovim/neovim/pull/17360, which has since been closed. Can someone using Neovim nightly see if this is still an issue?

j-hui avatar Mar 20 '22 02:03 j-hui

Works for me on nightly @j-hui.

levouh avatar Mar 22 '22 14:03 levouh

There's also this: https://github.com/neovim/neovim/issues/13628, which just closed.

I'm going to leave this issue open for visibility (since this plugin still exhibits what I consider buggy behavior on stable), but consider this resolved. Only a matter of time before the fix makes it to stable (:

j-hui avatar Mar 23 '22 21:03 j-hui