microsoft/Terminal

Resize window to maintain width (in chars) and height (in columns) when using ctrl-+ or ctrl--

Open

#10,466 建立於 2021年6月20日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)C++ (3,212 fork)batch import
Area-RenderingHelp WantedIssue-TaskProduct-Terminal

倉庫指標

Star
 (35,764 star)
PR 合併指標
 (平均合併 27天 19小時) (30 天內合併 24 個 PR)

描述

Description of the new feature/enhancement

The current reduces or increases font size when Ctrl-- or Ctrl-+ are pressed. However the window width and height in pixels stays the say. This leads to visual inconsistencies when using apps like vi on ubuntu. I'd like to propose that the window size changes to maintain the width in characters / line and and height in columns when the font size is changed. This proposed behavior is also the one coded in Ubuntu and MacOSX.

Proposed technical implementation details (optional)

If your default characters/line is 120 and the default lines is 40, and the font size is 12, when the Ctrl-+ button is pressed the font size increases to 14. What should happen then is that the Terminal window's width should change to one that holds 120 characters at Font Size 14. And it's height should change to one that holds 40 lines at size 14. So the Terminal window should resize to be slightly larger. Similarly when Ctrl-- is pressed, the Terminal window should resize to become smaller. This is the default in other Unix platforms.

貢獻者指南