Skip to content

Commit

Permalink
fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jan 13, 2020
1 parent 561f521 commit 5e758c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/vs/workbench/contrib/search/browser/openSymbolHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,11 @@ class SymbolEntry extends EditorQuickOpenEntry {
const input: IResourceInput = {
resource: this.bearing.location.uri,
options: {
pinned: !this.configurationService.getValue<IWorkbenchEditorConfiguration>().workbench.editor.enablePreviewFromQuickOpen
pinned: !this.configurationService.getValue<IWorkbenchEditorConfiguration>().workbench.editor.enablePreviewFromQuickOpen,
selection: this.bearing.location.range ? Range.collapseToStart(this.bearing.location.range) : undefined
}
};

if (this.bearing.location.range) {
input.options!.selection = Range.collapseToStart(this.bearing.location.range);
}

return input;
}

Expand Down
10 changes: 3 additions & 7 deletions src/vs/workbench/services/history/browser/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,11 @@ export class HistoryService extends Disposable implements IHistoryService {

private doNavigate(location: IStackEntry): Promise<IBaseEditor | undefined> {
const options: ITextEditorOptions = {
revealIfOpened: true // support to navigate across editor groups
revealIfOpened: true, // support to navigate across editor groups,
selection: location.selection,
revealInCenterIfOutsideViewport: !!location.selection
};

// Support selection and minimize scrolling by setting revealInCenterIfOutsideViewport
if (location.selection) {
options.selection = location.selection;
options.revealInCenterIfOutsideViewport = true;
}

if (location.input instanceof EditorInput) {
return this.editorService.openEditor(location.input, options);
}
Expand Down

0 comments on commit 5e758c1

Please sign in to comment.