Skip to content

Unix Console SetWindowSize implementation #96208

Closed
@tmds

Description

@tmds

In #75824 support was added for Console.SetWindowSize on Unix by using ioctl TIOCSWINSZ.

As I mentioned in #95654 (comment), I believe this is for informing the kernel about the actual size, and not for requesting a size.

This matches the behavior mentioned by @adamsitnik in this comment and the referenced stack overflow answer.

#75824 (comment) seems to sort of work because the kernel is told the terminal has a size of (80, 30). nvim gets that size when it asks the terminal size, and it then renders in that part of the terminal window only.

However, the window that shows the terminal doesn't show the terminal size changed.

I don't think this matches the Windows semantics, where (I assume) the window would resize or show scrollbars.

Based on this, I think we should not use TIOCSWINSZ to implement Console.SetWindowSize on Unix.

cc @adamsitnik @danmoseley @stephentoub @dotnet/area-system-console

Metadata

Metadata

Assignees

Labels

area-System.Consoleblocking-releasehelp wanted[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions