Skip to content

Typo hightlight -> highlight#108451

Merged
alexdima merged 2 commits intomicrosoft:masterfrom
justjosias:patch-1
Nov 16, 2020
Merged

Typo hightlight -> highlight#108451
alexdima merged 2 commits intomicrosoft:masterfrom
justjosias:patch-1

Conversation

@justjosias
Copy link
Contributor

The original member was named _renderLineHightlightOnlyWhenFocus, but I believe that is a typo and should instead be _renderLineHighlightOnlyWhenFocus

Interestingly, I found this typo because I was trying to search for code related to highlighting, and made the same mistake, spelling it "hightlight", and this code appeared as a result.

I do not see _renderLineHightlightOnlyWhenFocus referenced elsewhere, so this fix should not cause any breakage.

The original member was named `_renderLineHightlightOnlyWhenFocus`, but I
believe that is a typo and should instead be `_renderLineHighlightOnlyWhenFocus`
ItzLevvie
ItzLevvie approved these changes Oct 10, 2020
@JacksonKearl
Copy link
Contributor

I believe you missed some...

src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts:
   25  	protected _selectionIsEmpty: boolean;
   26: 	protected _renderLineHightlightOnlyWhenFocus: boolean;
   27  	protected _focused: boolean;

   39  		this._renderLineHighlight = options.get(EditorOption.renderLineHighlight);
   40: 		this._renderLineHightlightOnlyWhenFocus = options.get(EditorOption.renderLineHighlightOnlyWhenFocus);
   41  		this._contentLeft = layoutInfo.contentLeft;

   87  		this._renderLineHighlight = options.get(EditorOption.renderLineHighlight);
   88: 		this._renderLineHightlightOnlyWhenFocus = options.get(EditorOption.renderLineHighlightOnlyWhenFocus);
   89  		this._contentLeft = layoutInfo.contentLeft;

  112  	public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
  113: 		if (!this._renderLineHightlightOnlyWhenFocus) {
  114  			return false;

  172  			&& this._selectionIsEmpty
  173: 			&& (!this._renderLineHightlightOnlyWhenFocus || this._focused)
  174  		);

  178  			(this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all')
  179: 			&& (!this._renderLineHightlightOnlyWhenFocus || this._focused)
  180  		);

  191  			(this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all')
  192: 			&& (!this._renderLineHightlightOnlyWhenFocus || this._focused)
  193  		);

  198  			&& this._selectionIsEmpty
  199: 			&& (!this._renderLineHightlightOnlyWhenFocus || this._focused)
  200  		);

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.

There are some missed locations. Here are the build errors:

src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts(88,8): error TS2551: Property '_renderLineHightlightOnlyWhenFocus' does not exist on type 'AbstractLineHighlightOverlay'. Did you mean '_renderLineHighlightOnlyWhenFocus'?
src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts(113,13): error TS2551: Property '_renderLineHightlightOnlyWhenFocus' does not exist on type 'AbstractLineHighlightOverlay'. Did you mean '_renderLineHighlightOnlyWhenFocus'?
src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts(173,14): error TS2551: Property '_renderLineHightlightOnlyWhenFocus' does not exist on type 'CurrentLineHighlightOverlay'. Did you mean '_renderLineHighlightOnlyWhenFocus'?
src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts(179,14): error TS2551: Property '_renderLineHightlightOnlyWhenFocus' does not exist on type 'CurrentLineHighlightOverlay'. Did you mean '_renderLineHighlightOnlyWhenFocus'?
src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts(192,14): error TS2551: Property '_renderLineHightlightOnlyWhenFocus' does not exist on type 'CurrentLineMarginHighlightOverlay'. Did you mean '_renderLineHighlightOnlyWhenFocus'?
src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts(199,14): error TS2551: Property '_renderLineHightlightOnlyWhenFocus' does not exist on type 'CurrentLineMarginHighlightOverlay'. Did you mean '_renderLineHighlightOnlyWhenFocus'?

@ghost
Copy link

ghost commented Oct 13, 2020

CLA assistant check
All CLA requirements met.

@justjosias
Copy link
Contributor Author

justjosias commented Oct 13, 2020

Oh. I'll make sure to remember to use git grep in the future instead of relying on GitHub's search. Haha.

It's now been fixed and the build CI now succeeds.

@KapitanOczywisty
Copy link
Contributor

KapitanOczywisty commented Oct 13, 2020

Oh. I'll make sure to remember to use git grep in the future instead of relying on GitHub's search. Haha.

@justjosias Or use grep.app (Extended view) 😉 GitHub search sucks...

@justjosias justjosias requested a review from alexdima October 14, 2020 06:15
@alexdima alexdima added this to the November 2020 milestone Nov 16, 2020
@alexdima
Copy link
Member

Thank you!

@alexdima alexdima merged commit e62a205 into microsoft:master Nov 16, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2020
@justjosias justjosias deleted the patch-1 branch April 19, 2022 05:27
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.

5 participants