Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
67cf0074
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
67cf0074
编写于
4月 12, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
File from UNC-folders twice time opened in same instance after changes (fixes #24003)
上级
91334c8e
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
33 addition
and
43 deletion
+33
-43
src/vs/base/common/map.ts
src/vs/base/common/map.ts
+1
-9
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+0
-1
src/vs/workbench/browser/labels.ts
src/vs/workbench/browser/labels.ts
+1
-1
src/vs/workbench/parts/files/browser/editors/textFileEditor.ts
...s/workbench/parts/files/browser/editors/textFileEditor.ts
+2
-2
src/vs/workbench/parts/files/browser/fileActions.contribution.ts
...workbench/parts/files/browser/fileActions.contribution.ts
+1
-2
src/vs/workbench/parts/files/browser/fileActions.ts
src/vs/workbench/parts/files/browser/fileActions.ts
+3
-3
src/vs/workbench/parts/files/browser/views/explorerView.ts
src/vs/workbench/parts/files/browser/views/explorerView.ts
+7
-7
src/vs/workbench/parts/files/browser/views/explorerViewer.ts
src/vs/workbench/parts/files/browser/views/explorerViewer.ts
+4
-4
src/vs/workbench/parts/files/common/editors/fileEditorInput.ts
...s/workbench/parts/files/common/editors/fileEditorInput.ts
+4
-4
src/vs/workbench/parts/files/common/explorerViewModel.ts
src/vs/workbench/parts/files/common/explorerViewModel.ts
+2
-2
src/vs/workbench/parts/markers/browser/markersPanel.ts
src/vs/workbench/parts/markers/browser/markersPanel.ts
+1
-2
src/vs/workbench/parts/search/browser/searchViewlet.ts
src/vs/workbench/parts/search/browser/searchViewlet.ts
+2
-2
src/vs/workbench/parts/search/test/browser/searchActions.test.ts
...workbench/parts/search/test/browser/searchActions.test.ts
+1
-0
src/vs/workbench/services/files/node/fileService.ts
src/vs/workbench/services/files/node/fileService.ts
+1
-1
src/vs/workbench/services/history/browser/history.ts
src/vs/workbench/services/history/browser/history.ts
+3
-3
未找到文件。
src/vs/base/common/map.ts
浏览文件 @
67cf0074
...
...
@@ -6,7 +6,6 @@
'
use strict
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
export
interface
Key
{
toString
():
string
;
...
...
@@ -450,14 +449,7 @@ export class ResourceMap<T> {
}
private
toKey
(
resource
:
URI
):
string
{
let
key
:
string
;
if
(
resource
.
scheme
===
Schemas
.
file
)
{
key
=
resource
.
fsPath
;
}
else
{
key
=
resource
.
toString
();
}
let
key
=
resource
.
toString
();
if
(
this
.
ignoreCase
)
{
key
=
key
.
toLowerCase
();
}
...
...
src/vs/code/electron-main/window.ts
浏览文件 @
67cf0074
...
...
@@ -572,7 +572,6 @@ export class VSCodeWindow {
}
let
background
=
this
.
storageService
.
getItem
<
string
>
(
VSCodeWindow
.
themeBackgroundStorageKey
,
null
);
console
.
log
(
'
itm
'
+
background
);
if
(
!
background
)
{
let
baseTheme
=
this
.
getBaseTheme
();
return
baseTheme
===
'
hc-black
'
?
'
#000000
'
:
(
baseTheme
===
'
vs
'
?
'
#FFFFFF
'
:
(
platform
.
isMacintosh
?
'
#171717
'
:
'
#1E1E1E
'
));
// https://github.com/electron/electron/issues/5150
...
...
src/vs/workbench/browser/labels.ts
浏览文件 @
67cf0074
...
...
@@ -73,7 +73,7 @@ export class ResourceLabel extends IconLabel {
const
oldResource
=
this
.
label
?
this
.
label
.
resource
:
void
0
;
if
(
newResource
&&
oldResource
)
{
return
newResource
.
fsPath
!==
oldResource
.
fsPath
;
return
newResource
.
toString
()
!==
oldResource
.
toString
()
;
}
if
(
!
newResource
&&
!
oldResource
)
{
...
...
src/vs/workbench/parts/files/browser/editors/textFileEditor.ts
浏览文件 @
67cf0074
...
...
@@ -19,7 +19,7 @@ import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel'
import
{
FileEditorInput
}
from
'
vs/workbench/parts/files/common/editors/fileEditorInput
'
;
import
{
ExplorerViewlet
}
from
'
vs/workbench/parts/files/browser/explorerViewlet
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IFileOperationResult
,
FileOperationResult
,
FileChangesEvent
,
IFileService
,
isEqual
}
from
'
vs/platform/files/common/files
'
;
import
{
IFileOperationResult
,
FileOperationResult
,
FileChangesEvent
,
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
...
...
@@ -123,7 +123,7 @@ export class TextFileEditor extends BaseTextEditor {
const
hasInput
=
!!
this
.
input
;
const
modelDisposed
=
textFileModel
.
isDisposed
();
const
inputChanged
=
hasInput
&&
!
isEqual
(
this
.
input
.
getResource
().
fsPath
,
textFileModel
.
getResource
().
fsPath
);
const
inputChanged
=
hasInput
&&
this
.
input
.
getResource
().
toString
()
!==
textFileModel
.
getResource
().
toString
(
);
if
(
!
hasInput
||
// editor got hidden meanwhile
modelDisposed
||
// input got disposed meanwhile
...
...
src/vs/workbench/parts/files/browser/fileActions.contribution.ts
浏览文件 @
67cf0074
...
...
@@ -25,7 +25,6 @@ import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/c
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
explorerItemToFileResource
,
ExplorerFocusCondition
,
FilesExplorerFocusCondition
}
from
'
vs/workbench/parts/files/common/files
'
;
import
{
isEqual
}
from
'
vs/platform/files/common/files
'
;
class
FilesViewerActionContributor
extends
ActionBarContributor
{
...
...
@@ -88,7 +87,7 @@ class FilesViewerActionContributor extends ActionBarContributor {
}
const
workspace
=
this
.
contextService
.
getWorkspace
();
const
isRoot
=
workspace
&&
isEqual
(
stat
.
resource
.
fsPath
,
workspace
.
resource
.
fsPath
);
const
isRoot
=
workspace
&&
stat
.
resource
.
toString
()
===
workspace
.
resource
.
toString
(
);
// Copy File/Folder
if
(
!
isRoot
)
{
...
...
src/vs/workbench/parts/files/browser/fileActions.ts
浏览文件 @
67cf0074
...
...
@@ -963,7 +963,7 @@ export class PasteFileAction extends BaseFileAction {
// Find target
let
target
:
FileStat
;
if
(
isEqual
(
this
.
element
.
resource
.
fsPath
,
fileToCopy
.
resource
.
fsPath
))
{
if
(
this
.
element
.
resource
.
toString
()
===
fileToCopy
.
resource
.
toString
(
))
{
target
=
this
.
element
.
parent
;
}
else
{
target
=
this
.
element
.
isDirectory
?
this
.
element
:
this
.
element
.
parent
;
...
...
@@ -1270,7 +1270,7 @@ export class CompareResourcesAction extends Action {
}
// Check if target is identical to source
if
(
isEqual
(
this
.
resource
.
fsPath
,
globalResourceToCompare
.
fsPath
))
{
if
(
this
.
resource
.
toString
()
===
globalResourceToCompare
.
toString
(
))
{
return
false
;
}
...
...
@@ -1365,7 +1365,7 @@ export abstract class BaseSaveFileAction extends BaseActionWithErrorReporting {
const
editor
=
getCodeEditor
(
activeEditor
);
if
(
editor
)
{
const
activeResource
=
toResource
(
activeEditor
.
input
,
{
supportSideBySide
:
true
,
filter
:
[
'
file
'
,
'
untitled
'
]
});
if
(
activeResource
&&
isEqual
(
activeResource
.
fsPath
,
source
.
fsPath
))
{
if
(
activeResource
&&
activeResource
.
toString
()
===
source
.
toString
(
))
{
viewStateOfSource
=
editor
.
saveViewState
();
}
}
...
...
src/vs/workbench/parts/files/browser/views/explorerView.ts
浏览文件 @
67cf0074
...
...
@@ -17,7 +17,7 @@ import { prepareActions } from 'vs/workbench/browser/actionBarRegistry';
import
{
ITree
}
from
'
vs/base/parts/tree/browser/tree
'
;
import
{
Tree
}
from
'
vs/base/parts/tree/browser/treeImpl
'
;
import
{
IFilesConfiguration
,
ExplorerFolderContext
,
FilesExplorerFocussedContext
,
ExplorerFocussedContext
}
from
'
vs/workbench/parts/files/common/files
'
;
import
{
FileOperation
,
FileOperationEvent
,
IResolveFileOptions
,
FileChangeType
,
FileChangesEvent
,
IFileChange
,
IFileService
,
isEqual
,
isEqual
OrParent
}
from
'
vs/platform/files/common/files
'
;
import
{
FileOperation
,
FileOperationEvent
,
IResolveFileOptions
,
FileChangeType
,
FileChangesEvent
,
IFileChange
,
IFileService
,
isEqualOrParent
}
from
'
vs/platform/files/common/files
'
;
import
{
RefreshViewExplorerAction
,
NewFolderAction
,
NewFileAction
}
from
'
vs/workbench/parts/files/browser/fileActions
'
;
import
{
FileDragAndDrop
,
FileFilter
,
FileSorter
,
FileController
,
FileRenderer
,
FileDataSource
,
FileViewletState
,
FileAccessibilityProvider
}
from
'
vs/workbench/parts/files/browser/views/explorerViewer
'
;
import
{
toResource
}
from
'
vs/workbench/common/editor
'
;
...
...
@@ -440,12 +440,12 @@ export class ExplorerView extends CollapsibleViewletView {
// Only update focus if renamed/moved element is selected
let
restoreFocus
=
false
;
const
focus
:
FileStat
=
this
.
explorerViewer
.
getFocus
();
if
(
focus
&&
focus
.
resource
&&
isEqual
(
focus
.
resource
.
fsPath
,
oldResource
.
fsPath
))
{
if
(
focus
&&
focus
.
resource
&&
focus
.
resource
.
toString
()
===
oldResource
.
toString
(
))
{
restoreFocus
=
true
;
}
// Handle Rename
if
(
oldParentResource
&&
newParentResource
&&
isEqual
(
oldParentResource
.
fsPath
,
newParentResource
.
fsPath
))
{
if
(
oldParentResource
&&
newParentResource
&&
oldParentResource
.
toString
()
===
newParentResource
.
toString
(
))
{
modelElement
=
this
.
root
.
find
(
oldResource
);
if
(
modelElement
)
{
...
...
@@ -729,7 +729,7 @@ export class ExplorerView extends CollapsibleViewletView {
*/
private
getResolvedDirectories
(
stat
:
FileStat
,
resolvedDirectories
:
URI
[]):
void
{
if
(
stat
.
isDirectoryResolved
)
{
if
(
!
isEqual
(
stat
.
resource
.
fsPath
,
this
.
contextService
.
getWorkspace
().
resource
.
fsPath
))
{
if
(
stat
.
resource
.
toString
()
!==
this
.
contextService
.
getWorkspace
().
resource
.
toString
(
))
{
// Drop those path which are parents of the current one
for
(
let
i
=
resolvedDirectories
.
length
-
1
;
i
>=
0
;
i
--
)
{
...
...
@@ -758,7 +758,7 @@ export class ExplorerView extends CollapsibleViewletView {
public
select
(
resource
:
URI
,
reveal
:
boolean
=
this
.
autoReveal
):
TPromise
<
void
>
{
// Require valid path
if
(
!
resource
||
isEqual
(
resource
.
fsPath
,
this
.
contextService
.
getWorkspace
().
resource
.
fsPath
))
{
if
(
!
resource
||
resource
.
toString
()
===
this
.
contextService
.
getWorkspace
().
resource
.
toString
(
))
{
return
TPromise
.
as
(
null
);
}
...
...
@@ -798,7 +798,7 @@ export class ExplorerView extends CollapsibleViewletView {
const
currentSelection
:
FileStat
[]
=
this
.
explorerViewer
.
getSelection
();
for
(
let
i
=
0
;
i
<
currentSelection
.
length
;
i
++
)
{
if
(
isEqual
(
currentSelection
[
i
].
resource
.
fsPath
,
resource
.
fsPath
))
{
if
(
currentSelection
[
i
].
resource
.
toString
()
===
resource
.
toString
(
))
{
return
currentSelection
[
i
];
}
}
...
...
@@ -842,7 +842,7 @@ export class ExplorerView extends CollapsibleViewletView {
// Keep list of expanded folders to restore on next load
if
(
this
.
root
)
{
const
expanded
=
this
.
explorerViewer
.
getExpandedElements
()
.
filter
((
e
:
FileStat
)
=>
!
isEqual
(
e
.
resource
.
fsPath
,
this
.
contextService
.
getWorkspace
().
resource
.
fsPath
))
.
filter
((
e
:
FileStat
)
=>
e
.
resource
.
toString
()
!==
this
.
contextService
.
getWorkspace
().
resource
.
toString
(
))
.
map
((
e
:
FileStat
)
=>
e
.
resource
.
toString
());
this
.
settings
[
ExplorerView
.
MEMENTO_EXPANDED_FOLDER_RESOURCES
]
=
expanded
;
...
...
src/vs/workbench/parts/files/browser/views/explorerViewer.ts
浏览文件 @
67cf0074
...
...
@@ -112,7 +112,7 @@ export class FileDataSource implements IDataSource {
// Return if root reached
const
workspace
=
this
.
contextService
.
getWorkspace
();
if
(
workspace
&&
isEqual
(
stat
.
resource
.
fsPath
,
workspace
.
resource
.
fsPath
))
{
if
(
workspace
&&
stat
.
resource
.
toString
()
===
workspace
.
resource
.
toString
(
))
{
return
TPromise
.
as
(
null
);
}
...
...
@@ -424,7 +424,7 @@ export class FileController extends DefaultController {
// Handle root
const
workspace
=
this
.
contextService
.
getWorkspace
();
if
(
workspace
&&
isEqual
(
stat
.
resource
.
fsPath
,
workspace
.
resource
.
fsPath
))
{
if
(
workspace
&&
stat
.
resource
.
toString
()
===
workspace
.
resource
.
toString
(
))
{
tree
.
clearFocus
(
payload
);
tree
.
clearSelection
(
payload
);
...
...
@@ -699,7 +699,7 @@ export class FileDragAndDrop implements IDragAndDrop {
return
true
;
// NewStatPlaceholders can not be moved
}
if
(
isEqual
(
source
.
resource
.
fsPath
,
target
.
resource
.
fsPath
))
{
if
(
source
.
resource
.
toString
()
===
target
.
resource
.
toString
(
))
{
return
true
;
// Can not move anything onto itself
}
...
...
@@ -723,7 +723,7 @@ export class FileDragAndDrop implements IDragAndDrop {
}
const
workspace
=
this
.
contextService
.
getWorkspace
();
if
(
workspace
&&
!
isEqual
(
target
.
resource
.
fsPath
,
workspace
.
resource
.
fsPath
))
{
if
(
workspace
&&
target
.
resource
.
toString
()
!==
workspace
.
resource
.
toString
(
))
{
return
fromDesktop
||
isCopy
?
DRAG_OVER_ACCEPT_BUBBLE_UP_COPY
:
DRAG_OVER_ACCEPT_BUBBLE_UP
;
}
...
...
src/vs/workbench/parts/files/common/editors/fileEditorInput.ts
浏览文件 @
67cf0074
...
...
@@ -12,7 +12,7 @@ import URI from 'vs/base/common/uri';
import
{
EncodingMode
,
ConfirmResult
,
EditorInput
,
IFileEditorInput
}
from
'
vs/workbench/common/editor
'
;
import
{
TextFileEditorModel
}
from
'
vs/workbench/services/textfile/common/textFileEditorModel
'
;
import
{
BinaryEditorModel
}
from
'
vs/workbench/common/editor/binaryEditorModel
'
;
import
{
IFileOperationResult
,
FileOperationResult
,
isEqual
}
from
'
vs/platform/files/common/files
'
;
import
{
IFileOperationResult
,
FileOperationResult
}
from
'
vs/platform/files/common/files
'
;
import
{
BINARY_FILE_EDITOR_ID
,
TEXT_FILE_EDITOR_ID
,
FILE_EDITOR_INPUT_ID
}
from
'
vs/workbench/parts/files/common/files
'
;
import
{
ITextFileService
,
AutoSaveMode
,
ModelState
,
TextFileModelChangeEvent
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
...
...
@@ -75,13 +75,13 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput {
}
private
onDirtyStateChange
(
e
:
TextFileModelChangeEvent
):
void
{
if
(
isEqual
(
e
.
resource
.
fsPath
,
this
.
resource
.
fsPath
))
{
if
(
e
.
resource
.
toString
()
===
this
.
resource
.
toString
(
))
{
this
.
_onDidChangeDirty
.
fire
();
}
}
private
onModelOrphanedChanged
(
e
:
TextFileModelChangeEvent
):
void
{
if
(
isEqual
(
e
.
resource
.
fsPath
,
this
.
resource
.
fsPath
))
{
if
(
e
.
resource
.
toString
()
===
this
.
resource
.
toString
(
))
{
this
.
_onDidChangeLabel
.
fire
();
}
}
...
...
@@ -265,7 +265,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput {
}
if
(
otherInput
)
{
return
otherInput
instanceof
FileEditorInput
&&
isEqual
(
otherInput
.
resource
.
fsPath
,
this
.
resource
.
fsPath
);
return
otherInput
instanceof
FileEditorInput
&&
otherInput
.
resource
.
toString
()
===
this
.
resource
.
toString
(
);
}
return
false
;
...
...
src/vs/workbench/parts/files/common/explorerViewModel.ts
浏览文件 @
67cf0074
...
...
@@ -85,7 +85,7 @@ export class FileStat implements IFileStat {
* exists locally.
*/
public
static
mergeLocalWithDisk
(
disk
:
FileStat
,
local
:
FileStat
):
void
{
if
(
!
isEqual
(
disk
.
resource
.
fsPath
,
local
.
resource
.
fsPath
))
{
if
(
disk
.
resource
.
toString
()
!==
local
.
resource
.
toString
(
))
{
return
;
// Merging only supported for stats with the same resource
}
...
...
@@ -180,7 +180,7 @@ export class FileStat implements IFileStat {
*/
public
removeChild
(
child
:
FileStat
):
void
{
for
(
let
i
=
0
;
i
<
this
.
children
.
length
;
i
++
)
{
if
(
isEqual
(
this
.
children
[
i
].
resource
.
fsPath
,
child
.
resource
.
fsPath
))
{
if
(
this
.
children
[
i
].
resource
.
toString
()
===
child
.
resource
.
toString
(
))
{
this
.
children
.
splice
(
i
,
1
);
break
;
}
...
...
src/vs/workbench/parts/markers/browser/markersPanel.ts
浏览文件 @
67cf0074
...
...
@@ -36,7 +36,6 @@ import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegis
import
{
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IListService
}
from
'
vs/platform/list/browser/listService
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
isEqual
}
from
'
vs/platform/files/common/files
'
;
export
class
MarkersPanel
extends
Panel
{
...
...
@@ -345,7 +344,7 @@ export class MarkersPanel extends Panel {
let
selectedElement
=
this
.
tree
.
getSelection
();
if
(
selectedElement
&&
selectedElement
.
length
>
0
)
{
if
(
selectedElement
[
0
]
instanceof
Marker
)
{
if
(
isEqual
(
resource
.
uri
,
selectedElement
[
0
].
marker
.
resource
))
{
if
(
resource
.
uri
.
toString
()
===
selectedElement
[
0
].
marker
.
resource
.
toString
(
))
{
return
true
;
}
}
...
...
src/vs/workbench/parts/search/browser/searchViewlet.ts
浏览文件 @
67cf0074
...
...
@@ -30,7 +30,7 @@ import { Scope } from 'vs/workbench/common/memento';
import
{
IPreferencesService
}
from
'
vs/workbench/parts/preferences/common/preferences
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
getOutOfWorkspaceEditorResources
}
from
'
vs/workbench/common/editor
'
;
import
{
FileChangeType
,
FileChangesEvent
,
IFileService
,
isEqual
}
from
'
vs/platform/files/common/files
'
;
import
{
FileChangeType
,
FileChangesEvent
,
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
Viewlet
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
Match
,
FileMatch
,
SearchModel
,
FileMatchOrMatch
,
IChangeEvent
,
ISearchWorkbenchService
}
from
'
vs/workbench/parts/search/common/searchModel
'
;
import
{
QueryBuilder
}
from
'
vs/workbench/parts/search/common/searchQuery
'
;
...
...
@@ -914,7 +914,7 @@ export class SearchViewlet extends Viewlet {
return
;
}
if
(
isEqual
(
workspace
.
resource
.
fsPath
,
resource
.
fsPath
))
{
if
(
workspace
.
resource
.
toString
()
===
resource
.
toString
(
))
{
this
.
inputPatternIncludes
.
setValue
(
''
);
this
.
searchWidget
.
focus
();
return
;
...
...
src/vs/workbench/parts/search/test/browser/searchActions.test.ts
浏览文件 @
67cf0074
...
...
@@ -31,6 +31,7 @@ suite('Search Actions', () => {
instantiationService
.
stub
(
IModelService
,
stubModelService
(
instantiationService
));
instantiationService
.
stub
(
IKeybindingService
,
{});
instantiationService
.
stub
(
IKeybindingService
,
'
resolveKeybinding
'
,
(
keybinding
:
Keybinding
)
=>
[
new
USLayoutResolvedKeybinding
(
keybinding
,
OS
)]);
instantiationService
.
stub
(
IKeybindingService
,
'
lookupKeybinding
'
,
(
id
:
string
)
=>
null
);
counter
=
0
;
});
...
...
src/vs/workbench/services/files/node/fileService.ts
浏览文件 @
67cf0074
...
...
@@ -601,7 +601,7 @@ export class FileService implements IFileService {
// check if the resource is a child of the resource with override and use
// the provided encoding in that case
if
(
isParent
(
resource
.
fsPath
,
override
.
resource
.
fsPath
))
{
if
(
isParent
(
resource
.
fsPath
,
override
.
resource
.
fsPath
,
!
isLinux
/* ignorecase */
))
{
return
override
.
encoding
;
}
}
...
...
src/vs/workbench/services/history/browser/history.ts
浏览文件 @
67cf0074
...
...
@@ -14,7 +14,7 @@ import { IEditor as IBaseEditor, IEditorInput, ITextEditorOptions, IResourceInpu
import
{
EditorInput
,
IGroupEvent
,
IEditorRegistry
,
Extensions
,
toResource
,
IEditorGroup
}
from
'
vs/workbench/common/editor
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
FileChangesEvent
,
IFileService
,
FileChangeType
,
isEqual
}
from
'
vs/platform/files/common/files
'
;
import
{
FileChangesEvent
,
IFileService
,
FileChangeType
}
from
'
vs/platform/files/common/files
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -590,12 +590,12 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
if
(
arg2
instanceof
EditorInput
)
{
const
file
=
toResource
(
arg2
,
{
filter
:
'
file
'
});
return
file
&&
isEqual
(
file
.
fsPath
,
resource
.
fsPath
);
return
file
&&
file
.
toString
()
===
resource
.
toString
(
);
}
const
resourceInput
=
arg2
as
IResourceInput
;
return
resourceInput
&&
isEqual
(
resourceInput
.
resource
.
fsPath
,
resource
.
fsPath
);
return
resourceInput
&&
resourceInput
.
resource
.
toString
()
===
resource
.
toString
(
);
}
public
getHistory
():
(
IEditorInput
|
IResourceInput
)[]
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录