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

Tweak suppresion of word highlighting. #33

Merged
merged 1 commit into from
Feb 18, 2024
Merged

Conversation

de-vri-es
Copy link
Owner

@de-vri-es de-vri-es commented Feb 18, 2024

This PR changes the way word highlighting is suppressed:

First, only a sequence of (left, right) will get word highlighting. A sequence of (left left right) or (left right right) will no longer be used for word highlighting.

As a consequence, the suppression of word highlighting based on the number of non-highlighted characters can be made more strict. Instead of suppressing it when highlighting is more than 1/3 of the line, it is now suppressed when highlighting is more than 2/3 of the line.

Open issues:

  • The decision for highlight suppression takes into account unhighlighted whitespace too.
  • It would be nice to try and turn sequences of left, left, left, right, right, right into left, right, left, right, left right if it results in small word diffs.

@de-vri-es de-vri-es merged commit af4d345 into main Feb 18, 2024
6 checks passed
@de-vri-es de-vri-es deleted the tweak-highlight-suppresion branch February 18, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant