Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9ecc8107
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,发现更多精彩内容 >>
未验证
提交
9ecc8107
编写于
5月 05, 2020
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add a memory storage space for layout computation
上级
dc977941
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
1 deletion
+14
-1
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+4
-1
src/vs/editor/common/config/editorOptions.ts
src/vs/editor/common/config/editorOptions.ts
+9
-0
src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts
...ditor/test/common/viewLayout/editorLayoutProvider.test.ts
+1
-0
未找到文件。
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
9ecc8107
...
...
@@ -8,7 +8,7 @@ import { Emitter, Event } from 'vs/base/common/event';
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
*
as
arrays
from
'
vs/base/common/arrays
'
;
import
{
IEditorOptions
,
editorOptionsRegistry
,
ValidatedEditorOptions
,
IEnvironmentalOptions
,
IComputedEditorOptions
,
ConfigurationChangedEvent
,
EDITOR_MODEL_DEFAULTS
,
EditorOption
,
FindComputedEditorOptionValueById
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
IEditorOptions
,
editorOptionsRegistry
,
ValidatedEditorOptions
,
IEnvironmentalOptions
,
IComputedEditorOptions
,
ConfigurationChangedEvent
,
EDITOR_MODEL_DEFAULTS
,
EditorOption
,
FindComputedEditorOptionValueById
,
IComputeOptionsMemory
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
EditorZoom
}
from
'
vs/editor/common/config/editorZoom
'
;
import
{
BareFontInfo
,
FontInfo
}
from
'
vs/editor/common/config/fontInfo
'
;
import
{
IConfiguration
,
IDimension
}
from
'
vs/editor/common/editorCommon
'
;
...
...
@@ -284,6 +284,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC
public
readonly
onDidChange
:
Event
<
ConfigurationChangedEvent
>
=
this
.
_onDidChange
.
event
;
public
readonly
isSimpleWidget
:
boolean
;
private
_computeOptionsMemory
:
IComputeOptionsMemory
;
public
options
!
:
ComputedEditorOptions
;
private
_isDominatedByLongLines
:
boolean
;
...
...
@@ -299,6 +300,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC
this
.
isSimpleWidget
=
isSimpleWidget
;
this
.
_isDominatedByLongLines
=
false
;
this
.
_computeOptionsMemory
=
{};
this
.
_viewLineCount
=
1
;
this
.
_lineNumbersDigitCount
=
1
;
...
...
@@ -344,6 +346,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements IC
const
partialEnv
=
this
.
_getEnvConfiguration
();
const
bareFontInfo
=
BareFontInfo
.
createFromValidatedSettings
(
this
.
_validatedOptions
,
partialEnv
.
zoomLevel
,
this
.
isSimpleWidget
);
const
env
:
IEnvironmentalOptions
=
{
memory
:
this
.
_computeOptionsMemory
,
outerWidth
:
partialEnv
.
outerWidth
,
outerHeight
:
partialEnv
.
outerHeight
,
fontInfo
:
this
.
readConfiguration
(
bareFontInfo
),
...
...
src/vs/editor/common/config/editorOptions.ts
浏览文件 @
9ecc8107
...
...
@@ -687,6 +687,7 @@ export interface IComputedEditorOptions {
* @internal
*/
export
interface
IEnvironmentalOptions
{
readonly
memory
:
IComputeOptionsMemory
|
null
;
readonly
outerWidth
:
number
;
readonly
outerHeight
:
number
;
readonly
fontInfo
:
FontInfo
;
...
...
@@ -700,6 +701,12 @@ export interface IEnvironmentalOptions {
readonly
accessibilitySupport
:
AccessibilitySupport
;
}
/**
* @internal
*/
export
interface
IComputeOptionsMemory
{
}
export
interface
IEditorOption
<
K1
extends
EditorOption
,
V
>
{
readonly
id
:
K1
;
readonly
name
:
string
;
...
...
@@ -1756,6 +1763,7 @@ export interface EditorLayoutInfo {
* @internal
*/
export
interface
EditorLayoutInfoComputerEnv
{
memory
:
IComputeOptionsMemory
|
null
;
outerWidth
:
number
;
outerHeight
:
number
;
lineHeight
:
number
;
...
...
@@ -1780,6 +1788,7 @@ export class EditorLayoutInfoComputer extends ComputedEditorOption<EditorOption.
public
compute
(
env
:
IEnvironmentalOptions
,
options
:
IComputedEditorOptions
,
_
:
EditorLayoutInfo
):
EditorLayoutInfo
{
return
EditorLayoutInfoComputer
.
computeLayout
(
options
,
{
memory
:
env
.
memory
,
outerWidth
:
env
.
outerWidth
,
outerHeight
:
env
.
outerHeight
,
lineHeight
:
env
.
fontInfo
.
lineHeight
,
...
...
src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts
浏览文件 @
9ecc8107
...
...
@@ -77,6 +77,7 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => {
options
.
_write
(
EditorOption
.
lineNumbers
,
lineNumbersOptions
);
const
actual
=
EditorLayoutInfoComputer
.
computeLayout
(
options
,
{
memory
:
null
,
outerWidth
:
input
.
outerWidth
,
outerHeight
:
input
.
outerHeight
,
lineHeight
:
input
.
lineHeight
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录