Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
2a15ad9d
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2a15ad9d
编写于
2月 19, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Further clarification in TextEditorOptions #2797
上级
9dea2c3c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
12 deletion
+16
-12
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+7
-3
src/vs/workbench/api/node/extHostEditors.ts
src/vs/workbench/api/node/extHostEditors.ts
+3
-3
src/vs/workbench/api/node/extHostTypes.ts
src/vs/workbench/api/node/extHostTypes.ts
+2
-2
src/vs/workbench/api/node/mainThreadEditors.ts
src/vs/workbench/api/node/mainThreadEditors.ts
+4
-4
未找到文件。
src/vs/vscode.d.ts
浏览文件 @
2a15ad9d
...
...
@@ -532,13 +532,17 @@ declare namespace vscode {
* The size in spaces a tab takes. This is used for two purposes:
* - the rendering width of a tab character;
* - the number of spaces to insert when [insertSpaces](#TextEditorOptions.insertSpaces) is true.
* When getting a text editor's options, this property will always be a number (resolved).
* When setting a text editor's options, this property is optional and it can be a number or `"auto"`.
*/
tabSize
:
number
|
string
;
tabSize
?
:
number
|
string
;
/**
* When pressing Tab insert [n](#TextEditorOptions.tabSize) spaces.
* When getting a text editor's options, this property will always be a boolean (resolved).
* When setting a text editor's options, this property is optional and it can be a boolean or `"auto"`.
*/
insertSpaces
:
boolean
|
string
;
insertSpaces
?
:
boolean
|
string
;
}
/**
...
...
@@ -3104,7 +3108,7 @@ declare namespace vscode {
/**
* The folder that is open in VS Code. `undefined` when no folder
* has been opened.
*
*
* @readonly
*/
export
let
rootPath
:
string
;
...
...
src/vs/workbench/api/node/extHostEditors.ts
浏览文件 @
2a15ad9d
...
...
@@ -11,12 +11,12 @@ import {TPromise} from 'vs/base/common/winjs.base';
import
{
Remotable
,
IThreadService
}
from
'
vs/platform/thread/common/thread
'
;
import
{
ExtHostModelService
,
ExtHostDocumentData
}
from
'
vs/workbench/api/node/extHostDocuments
'
;
import
{
Selection
,
Range
,
Position
,
EditorOptions
}
from
'
./extHostTypes
'
;
import
{
ISingleEditOperation
,
ISelection
,
IRange
,
I
InternalIndentationOptions
,
I
Editor
,
EditorType
,
ICommonCodeEditor
,
ICommonDiffEditor
,
IDecorationRenderOptions
,
IRangeWithMessage
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ISingleEditOperation
,
ISelection
,
IRange
,
IEditor
,
EditorType
,
ICommonCodeEditor
,
ICommonDiffEditor
,
IDecorationRenderOptions
,
IRangeWithMessage
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/common/services/codeEditorService
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
Position
as
EditorPosition
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
MainThreadEditorsTracker
,
TextEditorRevealType
,
MainThreadTextEditor
,
ITextEditorConfiguration
}
from
'
vs/workbench/api/node/mainThreadEditors
'
;
import
{
MainThreadEditorsTracker
,
TextEditorRevealType
,
MainThreadTextEditor
,
ITextEditorConfiguration
Update
,
ITextEditorConfiguration
}
from
'
vs/workbench/api/node/mainThreadEditors
'
;
import
*
as
TypeConverters
from
'
./extHostTypeConverters
'
;
import
{
TextDocument
,
TextEditorSelectionChangeEvent
,
TextEditorOptionsChangeEvent
,
TextEditorOptions
,
TextEditorViewColumnChangeEvent
,
ViewColumn
}
from
'
vscode
'
;
import
{
EventType
}
from
'
vs/workbench/common/events
'
;
...
...
@@ -697,7 +697,7 @@ export class MainThreadEditors {
this
.
_textEditorsMap
[
id
].
revealRange
(
range
,
revealType
);
}
_trySetOptions
(
id
:
string
,
options
:
I
InternalIndentationOptions
):
TPromise
<
any
>
{
_trySetOptions
(
id
:
string
,
options
:
I
TextEditorConfigurationUpdate
):
TPromise
<
any
>
{
if
(
!
this
.
_textEditorsMap
[
id
])
{
return
TPromise
.
wrapError
(
'
TextEditor disposed
'
);
}
...
...
src/vs/workbench/api/node/extHostTypes.ts
浏览文件 @
2a15ad9d
...
...
@@ -37,8 +37,8 @@ export class Disposable {
}
export
interface
EditorOptions
{
tabSize
:
number
;
insertSpaces
:
boolean
;
tabSize
:
number
|
string
;
insertSpaces
:
boolean
|
string
;
}
export
class
Position
{
...
...
src/vs/workbench/api/node/mainThreadEditors.ts
浏览文件 @
2a15ad9d
...
...
@@ -15,12 +15,12 @@ import {Range} from 'vs/editor/common/core/range';
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
export
interface
ITextEditorConfigurationUpdate
{
tabSize
?:
number
;
insertSpaces
?:
boolean
;
tabSize
?:
number
|
string
;
insertSpaces
?:
boolean
|
string
;
}
export
interface
ITextEditorConfiguration
{
tabSize
:
number
;
insertSpaces
:
boolean
;
tabSize
:
number
|
string
;
insertSpaces
:
boolean
|
string
;
}
function
configurationsEqual
(
a
:
ITextEditorConfiguration
,
b
:
ITextEditorConfiguration
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录