Skip to content

Minimap - highlight all instances of selected word#132584

Merged
alexdima merged 7 commits into
microsoft:mainfrom
utajum:main
Sep 14, 2021
Merged

Minimap - highlight all instances of selected word#132584
alexdima merged 7 commits into
microsoft:mainfrom
utajum:main

Conversation

@utajum

@utajum utajum commented Sep 7, 2021

Copy link
Copy Markdown
Contributor

This PR fixes #84151

Adds minimap decoration options that are the same as find decoration ones on double click selection.

To test, simply double click a word after which you will see it selected in the minimap.

stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
className: 'selectionHighlight',
minimap: {
color: themeColorFromId(minimapFindMatch),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest that we create a new color e.g. minimalSelectionHighlight and not reuse minimapFindMatch

@alexdima alexdima left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it a bit confusing to reuse the minimapFindMatch color for selection highlights. I suggest to define a new color.

@ghost

ghost commented Sep 8, 2021

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@utajum

utajum commented Sep 8, 2021

Copy link
Copy Markdown
Contributor Author

minimap.selectionHighlight was already taken, so the new color variable is called minimapSelectionOccurrenceHighlight with an id of minimap.selectionOccurrenceHighlight.

The color used is the same as in Atom

@alexdima alexdima added this to the September 2021 milestone Sep 14, 2021
@alexdima alexdima merged commit 55061e3 into microsoft:main Sep 14, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimap - highlight all instances of selected word

2 participants