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

Go to references produce wrong highlights #5961

Closed
DuckDuckWhale opened this issue Feb 13, 2023 · 4 comments · Fixed by #6009
Closed

Go to references produce wrong highlights #5961

DuckDuckWhale opened this issue Feb 13, 2023 · 4 comments · Fixed by #6009
Assignees
Labels
C-bug Category: This is a bug

Comments

@DuckDuckWhale
Copy link
Contributor

Summary

Only the right portion of the line highlight in go to references are highlighted. This worked in last stable release but not current master.

Reproduction Steps

  1. hx in Helix
  2. Go to a variable and gr

I expected this to happen:

Whole line or just this variable is highlighted

Instead, this happened:

Highlight starts one space after the line, or when line wraps highlights also whitespaces in the middle of the wrap

Helix log

No response

Platform

Ubuntu 22.10

Terminal Emulator

Version 3.46.2 for GNOME 43

Helix Version

helix 22.12 (a4751db)

@DuckDuckWhale DuckDuckWhale added the C-bug Category: This is a bug label Feb 13, 2023
@the-mikedavis
Copy link
Member

Could you provide an asciinema recording or video or gif? I'm not sure I understand the issue you're seeing.

Also the logs when running in verbose mode (hx -v) would be helpful since this has to do with LSP interaction: https://github.com/helix-editor/helix/wiki/FAQ#access-the-log-file

@the-mikedavis
Copy link
Member

This might be unrelated to what you're seeing but I see in the code used by goto-definition/references/etc. that we use a point selection:

doc.set_selection(view.id, Selection::point(new_pos));

We could use a selection on the item's range like we do for diagnostics (#4713)

@DuckDuckWhale
Copy link
Contributor Author

Upon closer inspection, this appears to be a theming issue:

Stable Monokai:
Stable Monokai

Master Monokai (with line wrapping):
Master Monokai

Master Monokai Pro:
Master Monokai Pro

@pascalkuthe pascalkuthe self-assigned this Feb 13, 2023
@pascalkuthe
Copy link
Member

I have a pretty good idea what is causing this and how to fix it. Will look into it later this week

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.

3 participants