Audit uses of the screen buffer/alternate buffer, or come up with a design that makes this not an issue #3849

Open
opened 2026-01-30 23:31:29 +00:00 by claunia · 5 comments
Owner

Originally created by @DHowett-MSFT on GitHub (Sep 13, 2019).

Is this indicative of a larger problem? Should we file an outstanding work item to audit all sites of manipulating the active buffer and/or somehow change the design such that the methods cannot accidentally be called without resolving which one is the active one first?

For the latter, my proposal would be to hide all the verbage methods off the base class and implement some sort of interface that holds them that is only returned when/if someone has correctly queried for the active one first. I'd accept competing proposals, though.

Originally posted by @miniksa in https://github.com/microsoft/terminal/pull/2729#issuecomment-530923095

Originally created by @DHowett-MSFT on GitHub (Sep 13, 2019). Is this indicative of a larger problem? Should we file an outstanding work item to audit all sites of manipulating the active buffer and/or somehow change the design such that the methods cannot accidentally be called without resolving which one is the active one first? For the latter, my proposal would be to hide all the verbage methods off the base class and implement some sort of interface that holds them that is only returned when/if someone has correctly queried for the active one first. I'd accept competing proposals, though. _Originally posted by @miniksa in https://github.com/microsoft/terminal/pull/2729#issuecomment-530923095_
claunia added the Product-ConhostIssue-TaskArea-VT labels 2026-01-30 23:31:30 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 13, 2019):

This would be a great place to discuss why the alt buffer is a sidecar to the current buffer instead of a new console buffer (which is a supported scenario.) If the alt buffer were a true top-level buffer (possibly with a link to its originating buffer), every API that look up the "current buffer" would get the right one.

@DHowett-MSFT commented on GitHub (Sep 13, 2019): This would be a great place to discuss why the alt buffer is _a sidecar to the current buffer_ instead of _a new console buffer_ (which is a supported scenario.) If the alt buffer were a true top-level buffer (possibly with a link to its originating buffer), every API that look up the "current buffer" would get the right one.
Author
Owner

@mdtauk commented on GitHub (Sep 13, 2019):

What is the performance hit, if the command buffer was stored as strings, and re-drawn when needed - as opposed to being stored in texture memory?

@mdtauk commented on GitHub (Sep 13, 2019): What is the performance hit, if the command buffer was stored as strings, and re-drawn when needed - as opposed to being stored in texture memory?
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 13, 2019):

Wha? It is. We don’t cache prerendered screen content.

@DHowett-MSFT commented on GitHub (Sep 13, 2019): Wha? It is. We don’t cache prerendered screen content.
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 13, 2019):

This isn’t related to rendering :)

@DHowett-MSFT commented on GitHub (Sep 13, 2019): This isn’t related to rendering :)
Author
Owner

@mdtauk commented on GitHub (Sep 13, 2019):

Ignore me then - I always think in UI lol

@mdtauk commented on GitHub (Sep 13, 2019): Ignore me then - I always think in UI lol
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3849