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

[decsdm] scrolling/cursor-based-positioning when *sent* #23

Merged
merged 1 commit into from
Jun 20, 2021

Conversation

dankamongmen
Copy link
Contributor

@dankamongmen dankamongmen commented Jun 17, 2021

Please see dankamongmen/notcurses#1782 for background context. DECSDM in MLterm is reversed compared to most terminals I've tested with (e.g. Alacritty, Contour, Kitty, XTerm, and WezTerm).

@dankamongmen
Copy link
Contributor Author

It is only fair to cite the analysis of @j4james (see aforementioned bug); it is definitely possible to claim that yours is the correct interpretation of the relevant "standard". With that said, the (probably incorrect) behavior is very widespread and entrenched.

It's essentially a question of "do you want everything to have to work around your (correct) behavior, or accept this almost universal practice?" i don't envy you...but i would like this merged =]. thanks!

@j4james
Copy link

j4james commented Jun 17, 2021

For the record, I don't think WezTerm actually implements DECSDM (I can see in the code that the mode is parsed, but it doesn't do anything with the value, and the version I tested certainly wasn't effected by that mode). So I wouldn't say there is a clear cut preference for how this is implemented.

I also wouldn't be surprised if XTerm corrects its implementation once presented with conclusive proof that the current behaviour is incorrect (which we'll hopefully have in a couple of weeks).

@dankamongmen
Copy link
Contributor Author

I just want to say I agree with everything @j4james says here; the man speaks truth. So if y'all'd prefer to hold off, do as thou wilt.

@arakiken
Copy link
Owner

arakiken commented Jun 20, 2021

As a result of consideration, I merged your patch, thank you.

VT330/340 Programmer Reference Manual https://vt100.net/docs/vt3xx-gp/chapter14.html#S14.4
describes that DECSDM 'set' enables sixel scrolling, and xterm follows this description.
But @ttdoda tested the behavior of DECSDM on actual VT382 and VT330 at 2012 and 2014,
and he confirmed that the behavior of actual machines and the description of VT382 manual
were the opposite of the description of VT330/340 manual.
(@saitoha reported it to Thomas Dickey, but the behavior of xterm hasn't been changed.)
https://twitter.com/ttdoda/status/246407060131020802
https://twitter.com/ttdoda/status/453216088902221824
https://twitter.com/ttdoda/status/479053314412126208

(Actually, it's more natual to think that DECSDM 'reset' enables Sixel Scrolling Mode because
'SDM' doesn't mean Sixel Scrolling Mode but Sixel Display Mode.)

DECSDM of mlterm was implemented according to this result.
It is the same bahavior as RLogin which revived and implemented Sixel Graphics over ten years ago (at 2010).
https://github.com/kmiya-culti/RLogin/

But which behavior is the same as the original machines is not a big issue now.
Because xterm compatible behavior has been already widespread, I think that it should be adjusted to that.

Regards,

@arakiken
Copy link
Owner

I reverted this pull request, because xterm will change the behavior.
8763b09
hackerb9/lsix#41 (comment)

@dankamongmen
Copy link
Contributor Author

agreed with your action, sorry for taking you the wrong way =\

@arakiken
Copy link
Owner

Thanks very much for your detailed consideration and investigation.
(I sent an email to Thomas Dickey in June, but I couldn't provide a sufficient basis.)

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