Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Lingering highlights #8

Open
Aumnescio opened this issue May 30, 2023 · 3 comments
Open

Lingering highlights #8

Aumnescio opened this issue May 30, 2023 · 3 comments

Comments

@Aumnescio
Copy link

The highlight is never cleared on cursor move, which causes old/stale highlights to stay highlighted even if the cursor is completely outside of the pairs.

Minimal example situation where this can be seen easily:

  • | denotes cursor position.
  • delay option is set to 225.
-- ( |thing )
-- ( thing )

Quickly start pressing j, k, j, k, j... (Move cursor up and down.) The highlight will linger at the old location, and only gets cleared once the delay time is reached and a new highlight is created.

This linger is an issue with small delays too, like 32, but more difficult to notice. If holding down a movement key, for example <Right>, the delay will linger until the key is no longer held down.

I believe the lingering highlight also causes visual flicker when the vim option scrolloff is active. Which I myself find the most annoying. Up to the point of possibly being unable to use this plugin, which I like.

What must be kept in mind is that the highlight should not be cleared on every cursor move, as that would cause another type of flicker while moving the cursor inside a pair.

@utilyre
Copy link
Owner

utilyre commented May 30, 2023

Currently delay is kind of a workaround to avoid a little performance issue (it's barely noticeable but still there) that this plugin has. If you prefer to have instant highlighting just set it to zero. However I have some stuff in mind that can significantly improve the performance, but I can't get down to it until summer.

@Aumnescio
Copy link
Author

Aumnescio commented May 31, 2023

I don't think this issue is really about performance or instant highlighting. I want the activation delay, but no hide delay.
I would really prefer to avoid the awkwardly lingering highlights.

Here is a video demonstrating the linger I am talking about:

  • NOTE: Happens when delay value is ~15 to 200+.
linger.mov

I think the video should work, even though for me in Firefox, it says the file is corrupt. I probably have some extension/rule blocking video. When downloaded, the video did work. ( Edit: and it works on Chrome. )

@utilyre
Copy link
Owner

utilyre commented May 31, 2023

I don't think this issue is really about performance or instant highlighting. I want the activation delay, but no hide delay.
I would really prefer to avoid the awkwardly lingering highlights.

If that's the case, I don't have the time to implement that right now. But I surely will get to this in summer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants