WinEvents and ConPTY question #2542

Open
opened 2026-01-30 22:57:56 +00:00 by claunia · 0 comments
Owner

Originally created by @parkovski on GitHub (Jul 3, 2019).

Originally assigned to: @bitcrazed on GitHub.

A few days ago I noticed that NeoVim in tmux does not pick up resize events properly, but mysteriously when a different console window is resized, it suddenly fixes itself. I just tracked this down to the fact that libuv is listening for the EVENT_CONSOLE_LAYOUT WinEvent for any window, which doesn't seem to be firing for PTY layout changes.

Now, I believe this is a libuv bug and they should be handling WINDOW_BUFFER_SIZE_EVENT. But before ConPTY existed, their way did work.

Basically I'm looking for some clarification here - what are the console WinEvents supposed to be for, and should they be enabled for PTYs as well? And if not, it might be a good idea to document that they are only sent for actual conhost windows.

Originally created by @parkovski on GitHub (Jul 3, 2019). Originally assigned to: @bitcrazed on GitHub. A few days ago I noticed that NeoVim in tmux does not pick up resize events properly, but mysteriously when a different console window is resized, it suddenly fixes itself. I just tracked this down to the fact that [libuv is listening for the EVENT_CONSOLE_LAYOUT WinEvent for any window](https://github.com/libuv/libuv/blob/7ed1eced3145c9eb17f831c2d66cdaa3d440d904/src/win/tty.c#L2294), which doesn't seem to be firing for PTY layout changes. Now, I believe this is a libuv bug and they should be handling `WINDOW_BUFFER_SIZE_EVENT`. But before ConPTY existed, their way did work. Basically I'm looking for some clarification here - what are the console WinEvents supposed to be for, and should they be enabled for PTYs as well? And if not, it might be a good idea to document that they are only sent for actual conhost windows.
claunia added the Issue-QuestionResolution-AnsweredArea-InteropProduct-Conpty labels 2026-01-30 22:57:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2542