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 selection rotation on the last line #6807

Merged
merged 3 commits into from
Mar 24, 2023

Conversation

chrisduerr
Copy link
Member

This fixes an issue with terminal resizes when the selection is on the
last line. Alacritty would fail to rotate lines and keep the selection
in the same line index whenever the terminal line count was grown or
shrunk.

This issue occurred due to the range passed to the selection's rotate
function still being based on the old terminal size, which caused the
initial or target state of the rotation to be outside of the terminal
bounds.

Closes #6698.

Copy link
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

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

Also requires a CHANGELOG entry.

alacritty/src/display/mod.rs Show resolved Hide resolved
alacritty/src/display/mod.rs Show resolved Hide resolved
@chrisduerr
Copy link
Member Author

Should merge #6808 before this.

@kchibisov kchibisov removed their request for review March 22, 2023 04:28
@kchibisov
Copy link
Member

Just so you know, CHANGELOG entry is missing here, you likely forgot to push it.

This fixes an issue with terminal resizes when the selection is on the
last line. Alacritty would fail to rotate lines and keep the selection
in the same line index whenever the terminal line count was grown or
shrunk.

This issue occurred due to the range passed to the selection's rotate
function still being based on the old terminal size, which caused the
initial or target state of the rotation to be outside of the terminal
bounds.

Closes alacritty#6698.
@chrisduerr
Copy link
Member Author

Just so you know, CHANGELOG entry is missing here, you likely forgot to push it.

I don't know what you're talking about. It was clearly there already. 😅

@chrisduerr chrisduerr merged commit 2df8f86 into alacritty:master Mar 24, 2023
@chrisduerr chrisduerr deleted the fix_search_selection branch March 24, 2023 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Selection wrong when search end on last line
2 participants