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

Make crossterm support controlling multiple screen buffers #167

Open
3 tasks
TimonPost opened this issue Jun 22, 2019 · 2 comments
Open
3 tasks

Make crossterm support controlling multiple screen buffers #167

TimonPost opened this issue Jun 22, 2019 · 2 comments

Comments

@TimonPost
Copy link
Member

Task Description

A terminal has screen buffers to which you can write. Buffers are separated from each other and won't change one and other contents. The main buffer is visible by default. We can go to the alternate screen by using the 'crossterm_screen' crate. When we change stuff on the alternate screen nothing will change on the main screen and in reverse.

This is all nice and well, however, we are limited to the main, and alternate screen. And can't have a second alternate screen. I want cross-term to allow controlling multiple screen buffers.

Task Todo

  • Allow the user to Create as many screen buffer as he wants to
  • Allow the user to change the active screen buffer
  • Allow the user to delete buffers.

Notices

  • Windows allows us to easily support this because with winapi you can create a new screen buffer and make it the active (visible) one. Research needs to be done to accomplish this with Linux.

  • This functionality should be placed in the crossterm_screen create.

@TimonPost TimonPost changed the title Support multiple screen buffers Support controlling multiple screen buffers Jun 22, 2019
@TimonPost TimonPost changed the title Support controlling multiple screen buffers Make crossterm support controlling multiple screen buffers Jun 22, 2019
@TimonPost TimonPost mentioned this issue Jun 26, 2019
2 tasks
@imdaveho
Copy link
Contributor

Given the fact that a single alternate screen behavior is baked into xterm, one possible option is to create various Read/Write buffers and update the alternate screen based on what is stored. This would effectively emulate multiple "screen"s by then having the user select which "buffer" to render. This might be less of a library concern rather than a user implementation consideration. Or did you have something else in mind?

@TimonPost
Copy link
Member Author

No that is a good solution, I was thinking of that as well. We can mimic the behavior of output, input, error streams.

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

No branches or pull requests

2 participants