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

Add Screen::all_contents_formatted #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

austinjones
Copy link

@austinjones austinjones commented Jan 30, 2021

I'm thinking of using vt100 in tab-rs, to efficiently render the scrollback buffer. But I need the entire stored contents, including primary and alternate buffers, so that once scrollback has been completed, interaction with the user can proceed with live stdout.

This PR adds all_contents_formatted to Screen, which:

  • Fills both the primary and alternate buffer, leaving the currently active buffer visible
  • Returns content for all lines in scrollback, not just visible lines

- Fills both the primary and alternate buffer, leaving the currently active buffer visible
- Returns content for all lines in scrollback
@chris-laplante
Copy link

I would also like a way of getting the contents of the scrollback buffer without having to mess with scrollback position. Unfortunately, looking at the age of this issue I guess the repo is dead?

@ethanpailes
Copy link

I wrote ethanpailes@bcc2e63 which does something similar but accepts a parameter to determine the number of rows to include in the contents buffer. That's a bit more flexible since you can always just fetch the size and set n=rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants