Skip to content

[matchhighlighter] Don't highlight selected matches #2540

@TomMalbran

Description

@TomMalbran

This is a request for the matchhighlighter addon. Right now after selecting some text (one or multiple times) all the matches are highlighted including the ones selected. Since the selection already has a different background and is mostly the code you are working one, It would be nice if it wasn't also highlighted. What I mean, is that it should highlight all the matches, except the selected ones. This is just for selections, using only cursors with the showToken option active works fine.

  1. Open http://codemirror.net/demo/matchhighlighter.html
  2. Select the first instance of hardToSpotVar

Result:
After step 2 all the instances of hardToSpotVar are highlighted including the selected one.

Expected:
After step 2 I would like to see all the instances of hardToSpotVar highlighted except for the first one which is selected.

I am ok with having an option if this is not what most people would like.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions