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

refactor(lua): rewrite vim.highlight.range() #28986

Merged
merged 1 commit into from
May 25, 2024

Conversation

zeertzjq
Copy link
Member

@zeertzjq zeertzjq commented May 24, 2024

  • Use getregionpos().
  • Use a single extmark for non-blockwise selection.

@github-actions github-actions bot added refactor changes that are not features or bugfixes lua stdlib labels May 24, 2024
@zeertzjq zeertzjq force-pushed the lua-hl-range branch 3 times, most recently from 521d3e7 to 74ebae1 Compare May 24, 2024 22:50
- Use getregionpos().
- Use a single extmark for non-blockwise selection.
@zeertzjq zeertzjq merged commit bdb81af into neovim:master May 25, 2024
29 checks passed
@zeertzjq zeertzjq deleted the lua-hl-range branch May 25, 2024 12:37
@clason
Copy link
Member

clason commented May 26, 2024

This introduced a regression with diagnostics: if diagnostics are at the end of the line, the underline for it now extends to the beginning of the next line. I haven't cooked up a minimal example yet, but you can observe this in the lazy.nvim update output:
Screenshot 2024-05-26 at 13 04 46

I think there still needs to be some distinction between single- and multiline extmarks (regarding the hl_eol option).

@zeertzjq
Copy link
Member Author

I don't end of line or hl_eol are relevant. I think #29022 should fix this.

@clason
Copy link
Member

clason commented May 26, 2024

Indeed it does, thank you!

huangyingw pushed a commit to huangyingw/neovim that referenced this pull request May 31, 2024
- Use getregionpos().
- Use a single extmark for non-blockwise selection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lua stdlib refactor changes that are not features or bugfixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants