Terminal: back color erase, and reset the pending wrap on cursor moves - #2900
Open
insjang wants to merge 2 commits into
Open
Terminal: back color erase, and reset the pending wrap on cursor moves#2900insjang wants to merge 2 commits into
insjang wants to merge 2 commits into
Conversation
…on any cursor move Two places where the emulator departed from what programs written for xterm expect. Back color erase. Erasing wrote cells with no style, so they took the terminal's own background. Every colour terminal (xterm's "bce") erases in the background currently set, and programs rely on it: a run of a line is coloured by setting a background and erasing to the end of it, which is how a status line, a selection highlight or a table cell gets painted wider than its text. Without it such a run kept the terminal colour from its last character on. EL, ED and ECH now erase in the current background, and so do the cells that ICH opens and DCH uncovers, as in xterm; only the background carries over, not bold or underline. Pending wrap. With deferred wrapping (DECAWM as xterm does it) a character written to the last column leaves the cursor there with a wrap pending. DEC STD 070 lists what clears that state: CR, LF, IND, RI, NEL, the cursor movement sequences, and the erase, insert and delete sequences. The emulator cleared it only on a column move, so a line feed or a cursor-down after a full row still wrapped the next character a row further down and marked an unrelated row as wrapped - which showed up as unrelated rows joined when copying from a full screen program. Tests cover the backgrounds of each erase and of ICH/DCH, and the reset of the pending wrap by LF, cursor line moves and ECH.
…pp: Java heap space)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two places where the emulator departed from what programs written for xterm expect.
Back color erase. Erasing wrote cells with no style, so they took the terminal's own background. Every colour terminal (xterm's "bce") erases in the background currently set, and programs rely on it: a run of a line is coloured by setting a background and erasing to the end of it, which is how a status line, a selection highlight or a table cell gets painted wider than its text. Without it such a run kept the terminal colour from its last character on. EL, ED and ECH now erase in the current background, and so do the cells that ICH opens and DCH uncovers, as in xterm; only the background carries over, not bold or underline.
Pending wrap. With deferred wrapping (DECAWM as xterm does it) a character written to the last column leaves the cursor there with a wrap pending. DEC STD 070 lists what clears that state: CR, LF, IND, RI, NEL, the cursor movement sequences, and the erase, insert and delete sequences. The emulator cleared it only on a column move, so a line feed or a cursor-down after a full row still wrapped the next character a row further down and marked an unrelated row as wrapped - which showed up as unrelated rows joined when copying from a full screen program.
Tests cover the backgrounds of each erase and of ICH/DCH, and the reset of the pending wrap by LF, cursor line moves and ECH.