Skip to content

Commit 5e758c1

Browse files
author
Benjamin Pasero
committed
fix compile errors
1 parent 561f521 commit 5e758c1

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

src/vs/workbench/contrib/search/browser/openSymbolHandler.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,11 @@ class SymbolEntry extends EditorQuickOpenEntry {
119119
const input: IResourceInput = {
120120
resource: this.bearing.location.uri,
121121
options: {
122-
pinned: !this.configurationService.getValue<IWorkbenchEditorConfiguration>().workbench.editor.enablePreviewFromQuickOpen
122+
pinned: !this.configurationService.getValue<IWorkbenchEditorConfiguration>().workbench.editor.enablePreviewFromQuickOpen,
123+
selection: this.bearing.location.range ? Range.collapseToStart(this.bearing.location.range) : undefined
123124
}
124125
};
125126

126-
if (this.bearing.location.range) {
127-
input.options!.selection = Range.collapseToStart(this.bearing.location.range);
128-
}
129-
130127
return input;
131128
}
132129

src/vs/workbench/services/history/browser/history.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,15 +354,11 @@ export class HistoryService extends Disposable implements IHistoryService {
354354

355355
private doNavigate(location: IStackEntry): Promise<IBaseEditor | undefined> {
356356
const options: ITextEditorOptions = {
357-
revealIfOpened: true // support to navigate across editor groups
357+
revealIfOpened: true, // support to navigate across editor groups,
358+
selection: location.selection,
359+
revealInCenterIfOutsideViewport: !!location.selection
358360
};
359361

360-
// Support selection and minimize scrolling by setting revealInCenterIfOutsideViewport
361-
if (location.selection) {
362-
options.selection = location.selection;
363-
options.revealInCenterIfOutsideViewport = true;
364-
}
365-
366362
if (location.input instanceof EditorInput) {
367363
return this.editorService.openEditor(location.input, options);
368364
}

0 commit comments

Comments
 (0)