mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
fixes #107650
This commit is contained in:
parent
ea006a72c0
commit
0124f68884
|
@ -10,7 +10,6 @@ import { IAction, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassific
|
||||||
import { memoize } from 'vs/base/common/decorators';
|
import { memoize } from 'vs/base/common/decorators';
|
||||||
import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, ExplorerRootContext, ExplorerResourceReadonlyContext, IExplorerService, ExplorerResourceCut, ExplorerResourceMoveableToTrash, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, ExplorerCompressedLastFocusContext, ExplorerResourceAvailableEditorIdsContext } from 'vs/workbench/contrib/files/common/files';
|
import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, ExplorerRootContext, ExplorerResourceReadonlyContext, IExplorerService, ExplorerResourceCut, ExplorerResourceMoveableToTrash, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, ExplorerCompressedLastFocusContext, ExplorerResourceAvailableEditorIdsContext } from 'vs/workbench/contrib/files/common/files';
|
||||||
import { NewFolderAction, NewFileAction, FileCopiedContext, RefreshExplorerView, CollapseExplorerView } from 'vs/workbench/contrib/files/browser/fileActions';
|
import { NewFolderAction, NewFileAction, FileCopiedContext, RefreshExplorerView, CollapseExplorerView } from 'vs/workbench/contrib/files/browser/fileActions';
|
||||||
import { EditorResourceAccessor, SideBySideEditor } from 'vs/workbench/common/editor';
|
|
||||||
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
|
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
|
||||||
import * as DOM from 'vs/base/browser/dom';
|
import * as DOM from 'vs/base/browser/dom';
|
||||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||||
|
@ -42,7 +41,6 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
|
||||||
import { IAsyncDataTreeViewState } from 'vs/base/browser/ui/tree/asyncDataTree';
|
import { IAsyncDataTreeViewState } from 'vs/base/browser/ui/tree/asyncDataTree';
|
||||||
import { FuzzyScore } from 'vs/base/common/filters';
|
import { FuzzyScore } from 'vs/base/common/filters';
|
||||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
|
||||||
import { IFileService, FileSystemProviderCapabilities } from 'vs/platform/files/common/files';
|
import { IFileService, FileSystemProviderCapabilities } from 'vs/platform/files/common/files';
|
||||||
import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle';
|
import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { Event } from 'vs/base/common/event';
|
import { Event } from 'vs/base/common/event';
|
||||||
|
@ -681,7 +679,7 @@ export class ExplorerView extends ViewPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for files
|
// check for files
|
||||||
return withNullAsUndefined(EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.PRIMARY }));
|
return input?.resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async selectResource(resource: URI | undefined, reveal = this.autoReveal, retry = 0): Promise<void> {
|
public async selectResource(resource: URI | undefined, reveal = this.autoReveal, retry = 0): Promise<void> {
|
||||||
|
|
|
@ -19,7 +19,6 @@ import { IExpression } from 'vs/base/common/glob';
|
||||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||||
import { IEditableData } from 'vs/workbench/common/views';
|
import { IEditableData } from 'vs/workbench/common/views';
|
||||||
import { EditorResourceAccessor } from 'vs/workbench/common/editor';
|
|
||||||
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity';
|
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity';
|
||||||
|
|
||||||
function getFileEventsExcludes(configurationService: IConfigurationService, root?: URI): IExpression {
|
function getFileEventsExcludes(configurationService: IConfigurationService, root?: URI): IExpression {
|
||||||
|
@ -196,7 +195,7 @@ export class ExplorerService implements IExplorerService {
|
||||||
this.model.roots.forEach(r => r.forgetChildren());
|
this.model.roots.forEach(r => r.forgetChildren());
|
||||||
if (this.view) {
|
if (this.view) {
|
||||||
await this.view.refresh(true);
|
await this.view.refresh(true);
|
||||||
const resource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);
|
const resource = this.editorService.activeEditor?.resource;
|
||||||
const autoReveal = this.configurationService.getValue<IFilesConfiguration>().explorer.autoReveal;
|
const autoReveal = this.configurationService.getValue<IFilesConfiguration>().explorer.autoReveal;
|
||||||
|
|
||||||
if (reveal && resource && autoReveal) {
|
if (reveal && resource && autoReveal) {
|
||||||
|
|
Loading…
Reference in a new issue