Skip to content

Commit 46ba25e

Browse files
author
Benjamin Pasero
committed
search editor - go back to canonical URI for now
1 parent f48da22 commit 46ba25e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/vs/workbench/browser/parts/editor/titleControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export abstract class TitleControl extends Themable {
229229

230230
// Update contexts
231231
this.contextKeyService.bufferChangeEvents(() => {
232-
this.resourceContext.set(this.group.activeEditor ? withUndefinedAsNull(EditorResourceAccessor.getOriginalUri(this.group.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY })) : null);
232+
this.resourceContext.set(withUndefinedAsNull(EditorResourceAccessor.getOriginalUri(this.group.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY })));
233233
this.editorPinnedContext.set(this.group.activeEditor ? this.group.isPinned(this.group.activeEditor) : false);
234234
this.editorStickyContext.set(this.group.activeEditor ? this.group.isSticky(this.group.activeEditor) : false);
235235
});

src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
2121
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
2222
import { EditorDescriptor, Extensions as EditorExtensions, IEditorRegistry } from 'vs/workbench/browser/editor';
2323
import { Extensions as WorkbenchExtensions, IWorkbenchContribution, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
24-
import { ActiveEditorContext, Extensions as EditorInputExtensions, IEditorInputFactory, IEditorInputFactoryRegistry, EditorResourceAccessor } from 'vs/workbench/common/editor';
24+
import { ActiveEditorContext, Extensions as EditorInputExtensions, IEditorInputFactory, IEditorInputFactoryRegistry } from 'vs/workbench/common/editor';
2525
import { IViewsService } from 'vs/workbench/common/views';
2626
import { getSearchView } from 'vs/workbench/contrib/search/browser/searchActions';
2727
import { searchRefreshIcon } from 'vs/workbench/contrib/search/browser/searchIcons';
@@ -75,7 +75,7 @@ class SearchEditorContribution implements IWorkbenchContribution {
7575

7676
this.editorService.overrideOpenEditor({
7777
open: (editor, options, group) => {
78-
const resource = EditorResourceAccessor.getOriginalUri(editor);
78+
const resource = editor.resource;
7979
if (!resource) { return undefined; }
8080

8181
if (extname(resource) !== SEARCH_EDITOR_EXT) {

0 commit comments

Comments
 (0)