Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fca5c66e
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,发现更多精彩内容 >>
提交
fca5c66e
编写于
8月 13, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dragging a diff view to another editor group loses scroll position (fix #104517)
上级
ece81412
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
15 addition
and
4 deletion
+15
-4
src/vs/editor/browser/editorBrowser.ts
src/vs/editor/browser/editorBrowser.ts
+11
-0
src/vs/workbench/browser/parts/editor/editor.ts
src/vs/workbench/browser/parts/editor/editor.ts
+2
-2
src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts
...s/workbench/contrib/search/browser/anythingQuickAccess.ts
+2
-2
未找到文件。
src/vs/editor/browser/editorBrowser.ts
浏览文件 @
fca5c66e
...
...
@@ -1055,3 +1055,14 @@ export function getCodeEditor(thing: any): ICodeEditor | null {
return
null
;
}
/**
*@internal
*/
export
function
getIEditor
(
thing
:
any
):
editorCommon
.
IEditor
|
null
{
if
(
isCodeEditor
(
thing
)
||
isDiffEditor
(
thing
))
{
return
thing
;
}
return
null
;
}
src/vs/workbench/browser/parts/editor/editor.ts
浏览文件 @
fca5c66e
...
...
@@ -12,7 +12,7 @@ import { Event } from 'vs/base/common/event';
import
{
IConfigurationChangeEvent
,
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
ISerializableView
}
from
'
vs/base/browser/ui/grid/grid
'
;
import
{
get
Code
Editor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
get
I
Editor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
IEditorOptions
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEditorService
,
IResourceEditorInputType
}
from
'
vs/workbench/services/editor/common/editorService
'
;
...
...
@@ -132,7 +132,7 @@ export interface IEditorGroupView extends IDisposable, ISerializableView, IEdito
}
export
function
getActiveTextEditorOptions
(
group
:
IEditorGroup
,
expectedActiveEditor
?:
IEditorInput
,
presetOptions
?:
EditorOptions
):
EditorOptions
{
const
activeGroupCodeEditor
=
group
.
activeEditorPane
?
get
Code
Editor
(
group
.
activeEditorPane
.
getControl
())
:
undefined
;
const
activeGroupCodeEditor
=
group
.
activeEditorPane
?
get
I
Editor
(
group
.
activeEditorPane
.
getControl
())
:
undefined
;
if
(
activeGroupCodeEditor
)
{
if
(
!
expectedActiveEditor
||
expectedActiveEditor
.
matches
(
group
.
activeEditor
))
{
return
TextEditorOptions
.
fromEditor
(
activeGroupCodeEditor
,
presetOptions
);
...
...
src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts
浏览文件 @
fca5c66e
...
...
@@ -46,7 +46,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService';
import
{
ScrollType
,
IEditor
,
ICodeEditorViewState
,
IDiffEditorViewState
}
from
'
vs/editor/common/editorCommon
'
;
import
{
once
}
from
'
vs/base/common/functional
'
;
import
{
IEditorGroup
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
get
Code
Editor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
get
I
Editor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
withNullAsUndefined
}
from
'
vs/base/common/types
'
;
import
{
Codicon
,
stripCodicons
}
from
'
vs/base/common/codicons
'
;
...
...
@@ -134,7 +134,7 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
this
.
editorViewState
=
{
group
:
activeEditorPane
.
group
,
editor
:
activeEditorPane
.
input
,
state
:
withNullAsUndefined
(
get
Code
Editor
(
activeEditorPane
.
getControl
())?.
saveViewState
())
state
:
withNullAsUndefined
(
get
I
Editor
(
activeEditorPane
.
getControl
())?.
saveViewState
())
};
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录