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

Background of selected, partially visible tabs is un-highlighted #2992

Closed
mtoohey31 opened this issue Jul 7, 2022 · 3 comments · Fixed by #3313
Closed

Background of selected, partially visible tabs is un-highlighted #2992

mtoohey31 opened this issue Jul 7, 2022 · 3 comments · Fixed by #3313
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@mtoohey31
Copy link
Contributor

Summary

The background highlighting of the selected range doesn't extend all the way to the left as it should when tabs are partially displayed as the leftmost visible character.

screenshot

Notice how, in the screenshot above, the background of the leftmost character is not highlighted, even though the partially visible tab that occupies that space is part of the selection.

It's definitely an edge case, but it might be more noticeable with especially wide tab widths and small windows.

Reproduction Steps

I tried this:

  1. hx
  2. Position the view so a selected tab is partially visible.

I expected this to happen:

The background of the partially visible tab is highlighted, just like the rest of the selection.

Instead, this happened:

The background isn't highlighted.

Helix log

No response

Platform

Linux

Terminal Emulator

kitty 0.25.2

Helix Version

b612211

@mtoohey31 mtoohey31 added the C-bug Category: This is a bug label Jul 7, 2022
@mtoohey31 mtoohey31 changed the title Background of tab selection highlighting doesn't extend all the way to the left Background of selected, partially visible tabs is un-highlighted Jul 7, 2022
@the-mikedavis
Copy link
Member

Can you paste that part of the file? I'm confused what is tabs and what is spaces. Does this happen when not using indent-guides?

@mtoohey31
Copy link
Contributor Author

mtoohey31 commented Jul 31, 2022

I don't have the exact same text any more because I've refactored that code, but you can reproduce the same issue using an empty file of any language that uses tab indentation:

  1. Open helix
  2. :set-language go
  3. Insert a tab then a bunch of repeated characters; enough to completely fill the screen horizontally
  4. Move to the start of the line on top of the tab and enter visual mode
  5. Start moving the character to the right while still in visual mode. As soon as the view moves to the left for the first time, the highlighting for the background of the selected tab will disappear, even though 3 of its characters are still visible. I would expect that the background of the partial tab would still be highlighted.

Edit: Also yes, this happens without indent-guides. I can reproduce it with the default configuration.

@A-Walrus
Copy link
Contributor

A-Walrus commented Aug 3, 2022

This issue also affects other wide graphemes, such as Ideographic Space " ", or emojis such as "👩".

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