Allow highlighting across word boundaries#154
Merged
richrace merged 2 commits intoPulsar-Edit-Highlights:masterfrom Jun 23, 2018
Merged
Allow highlighting across word boundaries#154richrace merged 2 commits intoPulsar-Edit-Highlights:masterfrom
richrace merged 2 commits intoPulsar-Edit-Highlights:masterfrom
Conversation
Contributor
Author
|
@richrace Any comment on merging this? I'd forgotten about it since I have been using the feature in my own stream, but this may be a useful change for others. |
Member
|
I'll have a look this week. Sorry for the delay. |
|
As I started using this package today, I personally missed this feature... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I use this package to show what will be selected when inserting multiple cursors with ctrl+d (find-and-replace:select-next). As-is, the package will fail to highlight matching strings across word boundaries even when onlyHighlightWholeWords=false. For example, consider the following lines:
From these, I might want to highlight "uint8_t myVar". The package will unexpectedly not highlight both instances. As a side note: my expected behavior is the behavior of VSCode's selection highlighter.
The changes I've made remove the regular expression which seems designed to cut off the input at word boundaries. I can't imagine any case where you would want to highlight all instances of "variable" but specifically not want to highlight all instances of "variable " when you select that extra space at the end.