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

incorrect jump label highlight when non-ascii chars are used #10315

Closed
Iorvethe opened this issue Apr 9, 2024 · 7 comments · Fixed by #10317
Closed

incorrect jump label highlight when non-ascii chars are used #10315

Iorvethe opened this issue Apr 9, 2024 · 7 comments · Fixed by #10317
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@Iorvethe
Copy link
Contributor

Iorvethe commented Apr 9, 2024

Summary

In certain cases, the jump labels on the first line are not highlighted in the jump mode. If the same line is not at the top, the same labels are highlighted.

example.txt
  ← nnsp
first second



































Reproduction Steps

Here’s a screencast.

I tried this:

  1. hx example.txt
  2. ge
  3. gw

I expected this to happen:

  • The label of the first word of the topmost line to be highlighted.

Instead, this happened:

  • The label was there, but not highlighted, only the text was changed.

Helix log

No relevant log.

Platform

Linux

Terminal Emulator

alacritty 0.13.1 (fe2a3c56)

Installation Method

source

Helix Version

24.03-59-g3d72173b

@Iorvethe Iorvethe added the C-bug Category: This is a bug label Apr 9, 2024
@pascalkuthe
Copy link
Member

please attach your example.txt file next time you post an issue like this

@Iorvethe
Copy link
Contributor Author

Iorvethe commented Apr 9, 2024

Hi, perhaps you missed it, it’s right below the summary section. Or is it possible to embed a file in the issue?

@pascalkuthe
Copy link
Member

a sorry, yeah I didn't see that. I was able to reproduce regardless that is pretty odd. For me it does render a jump label but only for the second char which is even more odd (may be related to my fork tough)

@Iorvethe
Copy link
Contributor Author

Iorvethe commented Apr 9, 2024

I agree, it’s bizarre. I have other files with neither nnbsp nor nbsp and the issue is also present, but when trying to narrow it to a minimal working example, I ended up with the posted file. I suppose the issue is the same in both cases

@pascalkuthe
Copy link
Member

Ah I think I found it

@pascalkuthe
Copy link
Member

its unicode chars in general, I mixed up byte and char range

@Iorvethe
Copy link
Contributor Author

Iorvethe commented Apr 9, 2024

Great!

@pascalkuthe pascalkuthe changed the title No jump label highlight when nbsp or nnbsp used before incorrectt jump label highlight when non-ascii chars are used Apr 9, 2024
@pascalkuthe pascalkuthe changed the title incorrectt jump label highlight when non-ascii chars are used incorrect jump label highlight when non-ascii chars are used Apr 9, 2024
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants