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

Fix #581: Overzealous Mark Occurrences for single characters #582

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

bobbylight
Copy link
Owner

@bobbylight bobbylight commented Nov 21, 2024

Discussed as part of the issue in #575. The "Mark Occurrences" support usually highlights all instances of any token of type "identifier." Unfortunately many TokenMaker implementations style the characters ,, ;, and . (and possibly others) as identifiers for aesthetic purposes only. This has the side effect of the Mark Occurrences support highlighting all instances of them if the caret pauses near them.

At bets, this is visually surprising. At worst, it can cause the editor to hang for very large files with many instances of the character at the caret.

We should skip marking occurrences of non-word characters at any location. In 4.0.0 we can look at a more robust solution.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.35%. Comparing base (294a830) to head (ef03839).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...fe/ui/rsyntaxtextarea/DefaultOccurrenceMarker.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #582      +/-   ##
============================================
- Coverage     80.36%   80.35%   -0.01%     
- Complexity     7778     7781       +3     
============================================
  Files           178      178              
  Lines         30232    30235       +3     
  Branches       3909     3910       +1     
============================================
  Hits          24295    24295              
- Misses         4262     4267       +5     
+ Partials       1675     1673       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@bobbylight bobbylight marked this pull request as ready for review November 21, 2024 04:22
@bobbylight bobbylight added this to the 3.5.3 milestone Nov 21, 2024
@bobbylight bobbylight self-assigned this Nov 21, 2024
@bobbylight bobbylight added the bug label Nov 21, 2024
@bobbylight bobbylight merged commit 0e9d8d3 into master Nov 21, 2024
6 of 8 checks passed
@bobbylight bobbylight deleted the fix-581-overzealous-marked-occurrences branch November 21, 2024 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant