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

Fixed: Make ScrollDown escape respect margins #3005

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

evg-zhabotinsky
Copy link
Contributor

SD sequence (${CSI}${N}T) was scrolling the whole width
of the terminal instead of just between the margins.
RI sequence (${ESC}M, move cursor up 1 line) was doing the same. Fixed that.

Fixes #2576 where in tmux scrolling one of several
side-by-side panels down resulted in all visually scrolling.

Copy link

@parisafalahzadeh parisafalahzadeh left a comment

Choose a reason for hiding this comment

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

لطفا رفع خطا را آموزش دهید

@evg-zhabotinsky
Copy link
Contributor Author

@Fparisa166 You can install an .apk found under "checks" below. ("Details" link next to "build", then click "Summary" and under "Artifacts" find a file that matches your phone, probably termux-app_*-android-7-github-debug_universal, it's a zip with .apk inside.) This requires tha Termux.Api and others, if any, are also installed from Github releases.

Or just wait until an official update to Termux.

@evg-zhabotinsky
Copy link
Contributor Author

Just poking, this PR hasn't been merged for over 3 months.
The changes seem trivial enough to verify, and they fix an actual problem. (See the referenced issue.)
Also, I've been using Termux with this patch semi-frequently all that time, didn't notice any issues.
Or do I need to create a new issue, because the one this PR references was (mistakenly) closed as a wontfix?

@Grimler91
Copy link
Member

@evg-zhabotinsky I am guessing @agnostic-apollo has already merged this locally and will push it as part of the upcoming 0.119 update, considering the force-pushes above

@agnostic-apollo
Copy link
Member

The force push was for master branch, but this pull should be mergable before next release, haven't tested it yet, will do it after I push my local changes.

SD sequence (`${CSI}${N}T`) was scrolling the whole width
 of the terminal instead of just between the margins.
RI sequence (`${ESC}M`, move cursor up 1 line) was doing the same.
Fixed that.

Fixes termux#2576 where in tmux scrolling one of several
 side-by-side panels down resulted in all visually scrolling.
@fornwall
Copy link
Member

Thanks! I've added tests for this in ScrollRegionTest.

Seems that recent tmux versions no longer triggers this buggy (perhaps working around broken terminal emulators, as the mac terminal had the same issue), but this change indeed seems like a correct one, and aligns us with xterm and other more actively maintained terminals.

@fornwall fornwall merged commit d90e3fb into termux:master Sep 29, 2024
4 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.

[Bug]: Sympathetic scrolling in adjacent tmux panes
5 participants