ITADN

In neovim, :q behaves as a simple CoqStop and does not exit

#395Openmbty-hi 创建于 2025-07-10
M
mbty-hicommented
I recently switched from vim to neovim (v0.11.2), and now running `:q` with the focus on the main window (the one displaying the Coq file) behaves like a simple `:CoqStop`: the main window remains open. I observed this behavior on two different machines, although I don't see anyone else complaining about this issue. In vim, it behaved like a `:CoqStop` followed by a `:q`. I can still get the same behavior as with vim (i.e., exiting everything) by running `:qa` instead, but that is a bit unwieldy (typing one more character is just too much work). Here is the debug log showing what happens when I exit Neovim while Coqtail is running: https://gist.github.com/mbty-hi/ab727e9e9dc7f797e6cdf6a8cd9be1ca (note that I call `:q` twice). There is the following error on line 30: ``` Error detected while processing function <SNR>38_chanrecv[29]..coqtail#cleanupCB: line 4: E121: Undefined variable: b:coqtail_chan ``` I guess that this error interrupts the autocmd, and that for some reason neovim doesn't exit when something goes wrong in a QuitPre autocmd. This is probably related to (this)[https://github.com/whonore/Coqtail/blob/d7cef56b9618b85e1f55c5acc4d6189e80a4257b/autoload/coqtail.vim#L205], but this is where my investigation stands for now. Do you have any insight regarding what could cause such an issue?
1 条评论