Skip to content

Fix a few deviations from real terminal behaviour for the LCF#543

Merged
davidrg merged 1 commit into
masterfrom
lcf-fixes
Jul 9, 2026
Merged

Fix a few deviations from real terminal behaviour for the LCF#543
davidrg merged 1 commit into
masterfrom
lcf-fixes

Conversation

@davidrg

@davidrg davidrg commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Most of these affected the VT100 emulation which doesn't reset the LCF for a bunch of things.

As tested by wraptest, the VT100/102 and VT220 emulations match the wraptest results for the real terminals, and the K95 terminal type matches the VT520

								 K95     K95         K95
					 XTe DEC 100 102 220 220 420 520 K95
wrap works           y   y   y   y	 y   y   y   y   y
wrap is deferred     y   y   y   y	 y   y   y   y   y
CPR beyond last col  n   n   n   n	 n   n   n   n   n
CR works at margin   y   y   y   y	 y   y   y   y   y
BS works at margin   y   y   y   y	 y   y   y   y   y
TAB wraps at margin  n   n   n   n	 n   n   n   n   n
TAB cancels wrap     n   y   n   n	 y   y   n   n   n
NL cancels wrap      y   y   n   n	 y   y   y   y   y
NUL cancels wrap     n   n   n   n	 n   n   n   n   n
BEL cancels wrap     n   n   n   n	 n   n   n   n   n
RI cancels wrap      y   y   n   n	 y   y   y   y   y
SGR cancels wrap     n   n   n   n	 n   n   n   n   n
SM cancels wrap      n   n   n   n	 n   n   n   n   n
CUP cancels wrap     y   y   n   n	 y   y   y   y   y
CUF cancels wrap     y   y   n   n	 y   y   y   y   y
EL cancels wrap      y   y   n   n	 y   y   y   y   y
ED cancels wrap      y   y   n   n	 y   y   y   y   y
DCH cancels wrap     y   y   n   n	 y   y   y   y   y
ICH cancels wrap     y   y   -   y	 y   y   y   n   n
ECH cancels wrap     y   y   -   n	 y   n   y   y   n
CPR cancels wrap     n   n   n   n	 n   n   n   n   n
DECSC cancels wrap   n   n   n   n	 n   n   n   n   n
DECRC restores wrap  y   y   n   n	 y   y   y   y   y
DECRC restores AWM   n   n   n   y	 n   y   n       y
DECRC restores !AWM  n   n   n   y	 n   y   n       y

The wraptest results were checked on my VT520, VT220-Z, and an emulated VT100, so K95 should now be matching the real behaviour of these terminals at least as far as wraptest is concerned.

AWM being saved/restored by DECSC/DECRC will be dealt with later by #517.

… flag.

Most of these affected the VT100 emulation which doesn't reset the LCF for a bunch of things.
@davidrg davidrg linked an issue Jul 9, 2026 that may be closed by this pull request
@davidrg davidrg merged commit e6ab4c4 into master Jul 9, 2026
32 checks 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.

VT line wrapping is not quite right

1 participant