Closed stephen-huan closed 3 months ago
Indirectly addressed by https://github.com/Julian/lean.nvim/issues/43, which I would love to see finally merged as well.
I'd somewhat say "don't do that" :) as using :q!
on a buffer with no modifications is pointless, but nonetheless given this wasn't impossible to work around I've pushed a fix. Give it a shot and feel free to let me know if you notice anything else!
Give it a shot and feel free to let me know if you notice anything else!
It works, thanks for the fix!
I'd somewhat say "don't do that" :) as using
:q!
on a buffer with no modifications is pointless, but nonetheless given this wasn't impossible to work around I've pushed a fix.
I agree, the reason is I have <ctrl-q>
bound to :q!
so I use that shortcut reflexively to close any window. I've been using https://github.com/Julian/lean.nvim/issues/43#issuecomment-2234820480 so I don't need to do this manually anymore, thankfully. I raised the issue because, well, the dual to ":q!
is the same as :q
so don't do :q!
" is ":q!
is the same as :q
so both should work" :p.
If I close the infoview window manually with
:q!
, it errors withand these errors happen periodically afterwards when I move my cursor as well. Since these errors don't happen with
:q
, I thought it may be a difference in the autocmd trigger order. Below is what autocmds trigger with:q
and with
:q!
. Note that unlike with:q
,WinClosed
activates immediately and then again slightly later.Related to https://github.com/Julian/lean.nvim/issues/20 but the error is slightly different: window id vs buffer id.