Peek behind Alternate Screen Buffer, like Flip Screen (Alt+F12) in mintty of Git Bash #8954

Open
opened 2026-01-31 01:42:20 +00:00 by claunia · 1 comment
Owner

Originally created by @KalleOlaviNiemitalo on GitHub (Jun 10, 2020).

Description of the new feature/enhancement

After a program has activated the alternate screen buffer, I want to view the primary screen buffer and its scrollback and copy some text from them to the clipboard.

For example, I run some other commands and then git commit, which starts the nano editor to edit the commit message. The editor activates the alternate screen buffer of the terminal. I then want to look at the output of the previous commands and copy parts of it to the commit message, but the last page of output is hidden behind the editor's screen.

Proposed technical implementation details (optional)

Add a command similar to Flip Screen (Alt+F12) in mintty of Git Bash, and let me bind that to a key combination. The command makes the primary screen buffer temporarily visible but keeps the alternate screen buffer active. It does not report this change to applications. I can then scroll back and forth, select text, and copy it to the clipboard. If I run the same command again or type something, then the alternate screen buffer becomes visible again. (If a program outputs something to the alternate screen buffer, I think the primary screen buffer should remain visible, but that is not very important.)

Implementing https://github.com/microsoft/terminal/issues/3492 first might make this easier.

Originally created by @KalleOlaviNiemitalo on GitHub (Jun 10, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> After a program has activated the alternate screen buffer, I want to view the primary screen buffer and its scrollback and copy some text from them to the clipboard. For example, I run some other commands and then `git commit`, which starts the `nano` editor to edit the commit message. The editor activates the alternate screen buffer of the terminal. I then want to look at the output of the previous commands and copy parts of it to the commit message, but the last page of output is hidden behind the editor's screen. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Add a command similar to Flip Screen (Alt+F12) in mintty of Git Bash, and let me bind that to a key combination. The command makes the primary screen buffer temporarily visible but keeps the alternate screen buffer active. It does not report this change to applications. I can then scroll back and forth, select text, and copy it to the clipboard. If I run the same command again or type something, then the alternate screen buffer becomes visible again. (If a program outputs something to the alternate screen buffer, I think the primary screen buffer should remain visible, but that is not very important.) Implementing <https://github.com/microsoft/terminal/issues/3492> first might make this easier.
claunia added the Issue-FeatureProduct-TerminalArea-TerminalControl labels 2026-01-31 01:42:20 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 10, 2020):

I think this is a fine idea, probably requires #381 even before #3492 😉

@zadjii-msft commented on GitHub (Jun 10, 2020): I think this is a fine idea, probably requires #381 even before #3492 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8954