Skip to content

Highlight fails on neighbouring words #201

@Siguza

Description

@Siguza

Version info

$ atom --version
Atom    : 1.38.2
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3
$ apm list | grep lint
$

(Yeah, I have no package containing lint in its name installed - should I?)

Issue

When the word that is supposed to be highlighted appears twice with only a single character in between, only one of them is highlighted:

Screenshot

Test file:

00000000 00000000 00000000
00000000.00000000.00000000
00000000-00000000-00000000

00000000  00000000  00000000
00000000..00000000..00000000
00000000--00000000--00000000

I often sift through hexdumps, so I definitely have a use case for this.

From glancing through the code, it would seem to me that changing nonWordCharacters in search-model.js to be embedded in lookbehind and lookahead groups rather than non-capturing groups might fix the issue, but I neither have a build setup to test this, nor did I want to create a pull request without actually understanding the codebase.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions