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(terminal): properly trim lines with widechars on resize #1545

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

imsnif
Copy link
Member

@imsnif imsnif commented Jun 27, 2022

This is a fix for #1206

This also happens when we simply resize the pane without even opening vim or a similar app. The latter happens because we call the resize/reflow method when moving away from an alternative screen (in case the scrollback was resized somewhere in between).

In such a case, we trim lines after the last whitespace to that we won't reflow needless whitespace (eg. have a wrapped line with only whitespace). This mechanism wasn't wide-char aware, and because of that this bug was created. I adjusted it and it now works.

@imsnif imsnif temporarily deployed to cachix June 27, 2022 14:58 Inactive
@imsnif imsnif temporarily deployed to cachix June 27, 2022 14:58 Inactive
@imsnif imsnif temporarily deployed to cachix June 27, 2022 14:58 Inactive
@imsnif imsnif merged commit 7c5c134 into main Jun 27, 2022
@har7an har7an deleted the fix-trim-widechar branch October 23, 2022 15:08
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.

1 participant