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

termux incorrectly limits cursor movement to scroll region #1340

Closed
nicm opened this issue Nov 9, 2019 · 4 comments
Closed

termux incorrectly limits cursor movement to scroll region #1340

nicm opened this issue Nov 9, 2019 · 4 comments

Comments

@nicm
Copy link

nicm commented Nov 9, 2019

Hi

termux 0.80 on Android.

DECSTBM should only limit scrolling not cursor movement. Compare this in xterm and in termux (the xxx should be above the aaa):

printf '\033[4;7r\033[3;1Haaa\033[Axxx' 

Cursor movement should not be affected by the scroll region but termux appears to be forcing the cursor inside the region. I suspect this should be 0 rather than mTopMargin:

setCursorRow(Math.max(mTopMargin, mCursorRow - getArg0(1)));

And similarly for CUD.

@nicm
Copy link
Author

nicm commented Nov 9, 2019

Here is termux:
Screenshot_20191109-080319

@nicm
Copy link
Author

nicm commented Nov 9, 2019

And here is xterm:
xxx

@ghost ghost deleted a comment Nov 10, 2019
fornwall added a commit that referenced this issue Nov 10, 2019
The scrolling region set by DECSTBM should not affect the
Cursor Down (CUD) and Cursor Up (CUU) escape sequences.

Fixes #1340.
@fornwall
Copy link
Member

Thanks a lot for a good explanation and small test case!

Should be fixed by cdccc2c, which is now released in version 0.82 of the app.

Do you know if it's the same with DECSLRM right and left margins and CUF&CUB?

@nicm
Copy link
Author

nicm commented Nov 11, 2019

No, I didn't realise this before but it seems like left and right margins work differently and /do/ limit at least CUF, CUB, LF. Try this for example in xterm:

printf '\033[?69h\033[10;20s\033[1;10Ha\033[3Db\r\nc'
sleep 10

CUP and HPA are not affected.

fornwall added a commit that referenced this issue Nov 24, 2019
Remove tests that asserted that Cursor Down (CUD) and Cursor Up (CUU)
escape sequences were affected by the scrolling region set by DECSTBM.

This was incorrect and recently fixed:
#1340
fornwall added a commit that referenced this issue Nov 24, 2019
Remove tests that asserted that Cursor Down (CUD) and Cursor Up (CUU)
escape sequences were affected by the scrolling region set by DECSTBM.

This was incorrect and recently fixed:
#1340
@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
The scrolling region set by DECSTBM should not affect the
Cursor Down (CUD) and Cursor Up (CUU) escape sequences.

Fixes termux#1340.
AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
Remove tests that asserted that Cursor Down (CUD) and Cursor Up (CUU)
escape sequences were affected by the scrolling region set by DECSTBM.

This was incorrect and recently fixed:
termux#1340
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
The scrolling region set by DECSTBM should not affect the
Cursor Down (CUD) and Cursor Up (CUU) escape sequences.

Fixes termux#1340.
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
Remove tests that asserted that Cursor Down (CUD) and Cursor Up (CUU)
escape sequences were affected by the scrolling region set by DECSTBM.

This was incorrect and recently fixed:
termux#1340
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants