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

GUACAMOLE-1633: Add support of alternate screen buffer #521

Merged

Conversation

corentin-soriano
Copy link
Contributor

Add support of alternate screen buffer for tools like less/vi/man/...

Before:
image

After:
image
image
image

@hugaleno
Copy link

hugaleno commented Jun 5, 2024

This is some how related to GUACAMOLE-1256?

@corentin-soriano
Copy link
Contributor Author

This is some how related to GUACAMOLE-1256?

This pull request is not related to this ticket.

This PR only avoid this display on editor close:
image

@hugaleno
Copy link

hugaleno commented Jun 5, 2024

I was wondering if this alternate screen buffer would also solve that other problem, but thank you for clarifying

@corentin-soriano corentin-soriano force-pushed the GUACAMOLE-1633_alternate_buffer branch 2 times, most recently from 29c8d30 to da5d866 Compare June 5, 2024 14:56
Copy link
Contributor

@necouchman necouchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change, other than that looks okay to me.

Only other question is - does it make sense to allocate the alternate buffer only if/when it's required? I'm good either way, just curious...

src/terminal/terminal/terminal-priv.h Outdated Show resolved Hide resolved
@corentin-soriano
Copy link
Contributor Author

One change, other than that looks okay to me.

Only other question is - does it make sense to allocate the alternate buffer only if/when it's required? I'm good either way, just curious...

Indeed, it helps to limit memory usage. I made the modification, no impact on performance.
I took the opportunity to declare it without scrollback since it's unnecessary on the alternate buffer.

Copy link
Contributor

@necouchman necouchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@necouchman necouchman merged commit aa6e7ad into apache:main Jun 11, 2024
1 check passed
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