You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I maintain the blinds.nvim plugin that changes the background color of windows that are currently not selected. The functionality relies on WinEnter and BufEnter events fire. With Neoterm I noticed that the events aren't triggerd when I close a terminal.
The reason for this appears to be that vim doesn't fire WinEnter and BufEnter events when a buffer is deleted in the TermClose event.
For debugging purposes I disabled the TermClose auto command. This solved the issue. Furthermore, I ran an explicit :bw! on a newly created neoterm window and it still called the neoterm#destroy function through the job.on_exit handler - this handler doesn't cause the issue that TermClose does (it might also be a neovim bug). My impression is that the TermClose auto command can be deleted because the underlying functionality of cleaning up the terminal buffer is already triggered through the job.on_exit handler.
To Reproduce
Steps to reproduce the behavior:
Open neovim (window 1 contains the empty buffer)
Create a second window :new
Opened a neoterm with :T bash in window 2
Display all auto commands set verbose=9
exit neoterm ''
See error, no WinEnter or BufEnter auto command ist triggerd
Expected behavior
Window 1 should have the background color of the active window.
Screenshots
What's shown in the gif should happen but it doesn't happen:
Versions (please complete the following information):
Hi there, first of all, thanks for the very detailed issue. <3
My impression is that the TermClose auto command can be deleted because the underlying functionality of cleaning up the terminal buffer is already triggered through the job.on_exit handler.
Yeah, I agree. I did a quick test and without the TermClose action the BufEnter worked and the destruction of the neoterm object seem to work properly. 🎉
Describe the bug
I maintain the blinds.nvim plugin that changes the background color of windows that are currently not selected. The functionality relies on WinEnter and BufEnter events fire. With Neoterm I noticed that the events aren't triggerd when I close a terminal.
The reason for this appears to be that vim doesn't fire WinEnter and BufEnter events when a buffer is deleted in the TermClose event.
For debugging purposes I disabled the TermClose auto command. This solved the issue. Furthermore, I ran an explicit
:bw!
on a newly created neoterm window and it still called theneoterm#destroy
function through thejob.on_exit
handler - this handler doesn't cause the issue that TermClose does (it might also be a neovim bug). My impression is that the TermClose auto command can be deleted because the underlying functionality of cleaning up the terminal buffer is already triggered through thejob.on_exit
handler.To Reproduce
Steps to reproduce the behavior:
:new
:T bash
in window 2set verbose=9
Expected behavior
Window 1 should have the background color of the active window.
Screenshots
What's shown in the gif should happen but it doesn't happen:
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: