Skip to content

Allow highlighting across word boundaries#154

Merged
richrace merged 2 commits intoPulsar-Edit-Highlights:masterfrom
ion201:master
Jun 23, 2018
Merged

Allow highlighting across word boundaries#154
richrace merged 2 commits intoPulsar-Edit-Highlights:masterfrom
ion201:master

Conversation

@ion201
Copy link
Contributor

@ion201 ion201 commented Jun 22, 2017

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:

uint8_t myVar1 = 4;
uint8_t myVar2 = 46;

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.

@ion201
Copy link
Contributor Author

ion201 commented Sep 11, 2017

@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.

@richrace
Copy link
Member

I'll have a look this week. Sorry for the delay.

@TbsBrggng
Copy link

As I started using this package today, I personally missed this feature...
So: +1 ;-)

@richrace richrace merged commit 0d95b82 into Pulsar-Edit-Highlights:master Jun 23, 2018
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.

3 participants