Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimap - highlight all instances of selected word #132584

Merged
merged 7 commits into from
Sep 14, 2021
Merged

Conversation

utajum
Copy link
Contributor

@utajum utajum commented Sep 7, 2021

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.

@@ -1050,6 +1050,10 @@ export class SelectionHighlighter extends Disposable implements IEditorContribut
description: 'selection-highlight-overview',
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
className: 'selectionHighlight',
minimap: {
color: themeColorFromId(minimapFindMatch),
Copy link
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

Copy link
Member

@alexdima alexdima left a comment

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
Copy link

ghost commented Sep 8, 2021

CLA assistant check
All CLA requirements met.

@utajum
Copy link
Contributor Author

utajum commented Sep 8, 2021

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