Skip to content

Commit bfa3737

Browse files
author
aiday-mar
committed
Refactoring the code
1 parent a38a941 commit bfa3737

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,10 @@ export class StickyScrollWidget extends Disposable implements IOverlayWidget {
148148
}
149149
if (e.hasTriggerModifier) {
150150
// Control click
151-
if (this._candidateDefinitionsLength === 1) {
152-
this._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor as IActiveCodeEditor, { uri: this._editor.getModel()!.uri, range: this._stickyRangeProjectedOnEditor } as Location);
153-
} else {
151+
if (this._candidateDefinitionsLength > 1) {
154152
this._editor.revealPosition({ lineNumber: this._hoverOnLine, column: 1 });
155-
this._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor as IActiveCodeEditor, { uri: this._editor.getModel()!.uri, range: this._stickyRangeProjectedOnEditor } as Location);
156153
}
154+
this._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor as IActiveCodeEditor, { uri: this._editor.getModel()!.uri, range: this._stickyRangeProjectedOnEditor } as Location);
157155
} else {
158156
// Normal click
159157
this._editor.revealPosition({ lineNumber: this._hoverOnLine, column: 1 });

0 commit comments

Comments
 (0)