Skip to content

issues with clearing setWrapped when erasing#5785

Open
PerBothner wants to merge 1 commit intoxtermjs:masterfrom
PerBothner:erase-line
Open

issues with clearing setWrapped when erasing#5785
PerBothner wants to merge 1 commit intoxtermjs:masterfrom
PerBothner:erase-line

Conversation

@PerBothner
Copy link
Copy Markdown
Contributor

If you clear to the end of a line (using eraseInLine with param 0 or 2) it seems to me you want the isWrapped flag of the following line to be cleared, but that doesn't seem to be happening (based on the tests added to InputHandler.test.ts). There is a special case in eraseInDisplay to un-wrap the following line in the param==1 case - but that code is wrong, because it doesn't add ybase to j. Also, it seems highly inconsistent.

I propose for simplicity and consistency we should just clear isWrapped for the current line if start==0 and clear isWrapped for the following line if end is the end of the line. I haven't verified if xterm or other terminals do it the same way, but this rule seems simple and logical. As a bonus, we can remove the clearWrap parameter of _eraseInBufferLine.

Replace clearWrap parameter by start==0 test.
Add clearing wrap of folowing line if erasing to end of line.
This fixes some minor issues and inconsistencies.
@PerBothner
Copy link
Copy Markdown
Contributor Author

This has been incorporated into PR #5797. The testsuite changes in InputHandler.test.ts are the same in both PRs, but the impementation in InputHandler.ts is slightky different

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.

1 participant