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

fix wrapping at bottom of pane #116

Merged
merged 1 commit into from
Mar 8, 2021
Merged

Conversation

aaronjanse
Copy link
Owner

By definition, we're at the bottom of the scrolling region when v.Cursor.Y == v.scrollingRegion.bottom - 1:

3mux/vterm/vterm.go

Lines 16 to 17 in e2945b0

// cursor within when cursor.Y < bottom
bottom int

This fixes related off-by-one error. It also tells 3mux to scroll when wrapping at the bottom right corner of a scrolling region.

Test case, when run in a shell with a prompt at the bottom of a pane:

seq 1 1 100 | paste -s -d+

@aaronjanse aaronjanse requested a review from PotatoParser March 7, 2021 23:16
Copy link
Collaborator

@PotatoParser PotatoParser left a comment

Choose a reason for hiding this comment

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

Looks great! Working as intended!

@aaronjanse aaronjanse merged commit bba2ff2 into master Mar 8, 2021
@aaronjanse aaronjanse deleted the mar2021-fix-bottom-wrapping branch March 8, 2021 22:28
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.

2 participants