Problem: WinEnter autocommand may confuse Vim when closing tabpage
Solution: Verify that curwin did not change in close_others()
related: #18722
https://github.com/vim/vim/pull/18733
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq commented on this pull request.
In src/window.c:
> @@ -4416,6 +4417,11 @@ close_others(
for (wp = firstwin; win_valid(wp); wp = nextwp)
{
nextwp = wp->w_next;
+
+ // autocommands messed this one up
+ if (old_curwin != curwin && win_valid(old_curwin))
+ curwin = old_curwin;
Don't you need to set curbuf = curwin->w_buffer as well?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()