-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize the text buffer with the default attributes on a resize (#…
…5792) When we resize the text buffer, initialize the buffer with the _default_¹ attributes, not the _current_ ones. If we use the current attributes, then we can get into scenarios where something like `vim` is running, and left the attributes set to something other than the defaults, and when we resized the buffer, we'd fill it up with color, as opposed to whatever the default would be. This PR instead initializes the buffers with the default colors. It also makes sure to set the active attributes of the newly created buffers back to whatever the current attributes of the old buffer were. [1]: For the Terminal, the default attributes are "default on default". For conhost, the default attributes are whatever the result of `Settings::GetDefaultAttributes` is, which could be any combo of the legacy indices and the default color. ## PR Checklist * [x] Closes #3848 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed * ran tests
- Loading branch information
1 parent
546322b
commit 913cf4b
Showing
3 changed files
with
169 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters