Skip to content

[matchhighlighter] It should use the primary selection #2539

@TomMalbran

Description

@TomMalbran

We are trying to integrate the matchhighlighter addon into Brackets and we realized that when using multiple cursors the matches come from the selection closest to the start of the document and not from the primary selection (the last selection made). Notice that it works correctly with cursor when the option showToken is active but it doesn't work with selections.

To reproduce it:

  1. Open http://codemirror.net/demo/matchhighlighter.html
  2. Double click on Select
  3. Press ctrl and double click on hardToSpotVar

Result:
After step 2 the only instance of Select is highlighted as expected.
After step 3 the only instance of Select is still highlighted.

Expected:
After step 3 I would expect to see all the instances of hardToSpotVar highlighted since the primary selection is selecting hardToSpotVar.

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