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

Updating unicode-width from 0.1.12 to 0.1.13 broke newline rendering #10950

Closed
RoloEdits opened this issue Jun 14, 2024 · 2 comments · Fixed by #10963
Closed

Updating unicode-width from 0.1.12 to 0.1.13 broke newline rendering #10950

RoloEdits opened this issue Jun 14, 2024 · 2 comments · Fixed by #10963
Labels
C-bug Category: This is a bug

Comments

@RoloEdits
Copy link
Contributor

RoloEdits commented Jun 14, 2024

Summary

When rebasing onto master I noticed some render issues. I made an identical branch but deleted this #10926 single commit and everything worked fine again.

WIth commit:
helix-master-broken

Without:
helix-master-fixed

In looking more into it to see if I cant find what it could be, I was lead by 53da38a to start with unicode-width.

There I found an issue about breaking semver by one of the maintainers of ratatui, where they also seem to have had rendering issues.

There is currently an open issue on how unicode-width should handle line breaks given the recent changes: unicode-rs/unicode-width#60

Connected: #6012

Platform

Windows

Terminal Emulator

Alacritty

Installation Method

Source

Helix Version

Based off of 9c479e6

@the-mikedavis
Copy link
Member

I can't reproduce that rendering. What is your language config for Rust?

@the-mikedavis
Copy link
Member

the-mikedavis commented Jun 14, 2024

Ah ok, I can see it while reproducing #10948:

  • open a scratch buffer
  • type ~/.config/helix
  • select that (x_)
  • gf

The error shifts the statusline up.

As you say looks like the issue is that line endings are now width = 1 so we need to check for those graphemes when we render in Buffer::set_string.

Could you give #10962 a try and see if it fixes the rendering issues you show?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants