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

webterm: safer printf rendering #6258

Merged
merged 1 commit into from Feb 3, 2023
Merged

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Jan 27, 2023

As it turns out, the exact behavior of the 'S' CSI command is not "move contents up into scrollback", but rather "delete the top line(s), move other contents up". This behavior leads webterm to eat into outputs whenever it renders slogs.

Xterm(.js), when given a newline character at the bottom of a scroll region, does produce the desired behavior of bumping the top line away into scrollback, instead of obliterating it.

This implementation now diverges from vere's, which is unfortunate, but the alternative is making webterm track the contents of the bottom-most line of the default session, which seems rather ridiculous by comparison.

Fixes #6257.

As it turns out, the exact behavior of the 'S' CSI command is not "move
contents up into scrollback", but rather "delete the top line(s), move other
contents up". This behavior leads webterm to eat into outputs whenever it
renders slogs.

Xterm(.js), when given a newline character at the bottom of a scroll region,
does produce the desired behavior of bumping the top line away into scrollback,
instead of obliterating it.

This implementation now diverges from vere's, which is unfortunate, but the
alternative is making webterm track the contents of the bottom-most line of
the default session, which seems rather ridiculous by comparison.

Fixes #6257.
@Fang- Fang- requested a review from tomholford January 27, 2023 23:34
Copy link
Contributor

@tomholford tomholford left a comment

Choose a reason for hiding this comment

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

LGTM

@jalehman jalehman merged commit f348c44 into develop Feb 3, 2023
@jalehman jalehman deleted the i/6257/un-hungry-webterm branch February 3, 2023 15:39
Fang- added a commit that referenced this pull request Feb 6, 2023
For release with a new glob that includes #6258.
@Fang- Fang- mentioned this pull request Feb 6, 2023
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.

webterm: eats scrollback to render printfs
3 participants