Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push/pop visible scrollback by VT-command #402

Closed
o-sdn-o opened this issue Jun 20, 2023 · 0 comments
Closed

Push/pop visible scrollback by VT-command #402

o-sdn-o opened this issue Jun 20, 2023 · 0 comments
Labels
enhancement New feature or request Terminal Built-in terminal emulator
Milestone

Comments

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Jun 20, 2023

We need to come up with a new VT sequence to temporarily save the visible scrollback lines (something like Push/PopViewport). This will allow Far Manager to get rid of the use of the ReadConsoleOutput* API. This should work for both the normal buffer and the alternate one.

The use case looks like the following:

  • At startup, FM outputs two '\n' to reserve space for its prompt and keyboard shortcuts.
  • FM makes the normal buffer's copy by the PushViewport.
  • FM draws its interface on top of the scrollback, while not allowing any scrolling of the buffer.
  • Before each launch of an external program, FM emits PopViewport and executes the program.
  • After the program terminates, FM reserves two lines for its prompt and keyboard shortcuts (2x'\n') and emits PushViewport.
  • FM draws its UI on top of the scrollback.
  • When FM disables/enables its panels, it emits PopViewport followed by the PushViewport command and draws its panels there on top of the original scrollback.
  • At exit, FM restores the scrollback just by emitting PopViewport.
push: CSI 411 s
pop:  CSI 411 u

411 means All.

@o-sdn-o o-sdn-o added enhancement New feature or request Terminal Built-in terminal emulator labels Jun 20, 2023
@o-sdn-o o-sdn-o added this to the Icebox ❄ milestone Dec 30, 2023
@o-sdn-o o-sdn-o closed this as completed Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Terminal Built-in terminal emulator
Projects
None yet
Development

No branches or pull requests

1 participant