Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
026fc297
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,发现更多精彩内容 >>
提交
026fc297
编写于
5月 22, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grid - open editors in active group when no ViewColumn is provided
上级
db3acf9e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
13 deletion
+10
-13
extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts
...ns/vscode-api-tests/src/singlefolder-tests/window.test.ts
+2
-2
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+2
-2
src/vs/workbench/api/node/extHostTextEditors.ts
src/vs/workbench/api/node/extHostTextEditors.ts
+0
-2
src/vs/workbench/api/node/extHostTypeConverters.ts
src/vs/workbench/api/node/extHostTypeConverters.ts
+6
-7
未找到文件。
extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts
浏览文件 @
026fc297
...
...
@@ -133,7 +133,7 @@ suite('window namespace tests', () => {
}
});
test
(
'
issue #25801 -
default column when opening a file
'
,
async
()
=>
{
test
(
'
default column when opening a file
'
,
async
()
=>
{
const
[
docA
,
docB
,
docC
]
=
await
Promise
.
all
([
workspace
.
openTextDocument
(
await
createRandomFile
()),
workspace
.
openTextDocument
(
await
createRandomFile
()),
...
...
@@ -153,7 +153,7 @@ suite('window namespace tests', () => {
`wanted fileName:
${
editor
.
document
.
fileName
}
/viewColumn:
${
editor
.
viewColumn
}
but got fileName:
${
window
.
activeTextEditor
!
.
document
.
fileName
}
/viewColumn:
${
window
.
activeTextEditor
!
.
viewColumn
}
. a:
${
docA
.
fileName
}
, b:
${
docB
.
fileName
}
, c:
${
docC
.
fileName
}
`
);
assert
.
ok
(
window
.
activeTextEditor
!
.
document
===
docC
);
assert
.
equal
(
window
.
activeTextEditor
!
.
viewColumn
,
ViewColumn
.
One
);
assert
.
equal
(
window
.
activeTextEditor
!
.
viewColumn
,
ViewColumn
.
Two
);
});
test
(
'
issue #27408 - showTextDocument & vscode.diff always default to ViewColumn.One
'
,
async
()
=>
{
...
...
src/vs/vscode.d.ts
浏览文件 @
026fc297
...
...
@@ -752,7 +752,7 @@ declare module 'vscode' {
export
interface
TextDocumentShowOptions
{
/**
* An optional view column in which the [editor](#TextEditor) should be shown.
* The default is the [one](#ViewColumn.
On
e), other values are adjusted to
* The default is the [one](#ViewColumn.
Activ
e), other values are adjusted to
* be `Min(column, columnCount + 1)`, the [active](#ViewColumn.Active)-column is
* not adjusted.
*/
...
...
@@ -5479,7 +5479,7 @@ declare module 'vscode' {
* to control where the editor is being shown. Might change the [active editor](#window.activeTextEditor).
*
* @param document A text document to be shown.
* @param column A view column in which the [editor](#TextEditor) should be shown. The default is the [one](#ViewColumn.
On
e), other values
* @param column A view column in which the [editor](#TextEditor) should be shown. The default is the [one](#ViewColumn.
Activ
e), other values
* are adjusted to be `Min(column, columnCount + 1)`, the [active](#ViewColumn.Active)-column is
* not adjusted.
* @param preserveFocus When `true` the editor will not take focus.
...
...
src/vs/workbench/api/node/extHostTextEditors.ts
浏览文件 @
026fc297
...
...
@@ -11,7 +11,6 @@ import { TextEditorSelectionChangeKind } from './extHostTypes';
import
*
as
TypeConverters
from
'
./extHostTypeConverters
'
;
import
{
TextEditorDecorationType
,
ExtHostTextEditor
}
from
'
./extHostTextEditor
'
;
import
{
ExtHostDocumentsAndEditors
}
from
'
./extHostDocumentsAndEditors
'
;
import
{
EditorViewColumn
}
from
'
vs/workbench/api/shared/editor
'
;
import
{
MainContext
,
MainThreadTextEditorsShape
,
ExtHostEditorsShape
,
ITextDocumentShowOptions
,
ITextEditorPositionData
,
IMainContext
,
WorkspaceEditDto
,
IEditorPropertiesChangeData
}
from
'
./extHost.protocol
'
;
import
*
as
vscode
from
'
vscode
'
;
...
...
@@ -73,7 +72,6 @@ export class ExtHostEditors implements ExtHostEditorsShape {
};
}
else
{
options
=
{
position
:
0
as
EditorViewColumn
,
preserveFocus
:
false
};
}
...
...
src/vs/workbench/api/node/extHostTypeConverters.ts
浏览文件 @
026fc297
...
...
@@ -158,23 +158,22 @@ export namespace DiagnosticSeverity {
export
namespace
ViewColumn
{
export
function
from
(
column
?:
vscode
.
ViewColumn
):
EditorViewColumn
{
let
editorColumn
=
0
;
if
(
typeof
column
!==
'
number
'
)
{
// stick with ONE
let
editorColumn
:
EditorViewColumn
;
if
(
column
===
<
number
>
types
.
ViewColumn
.
One
)
{
editorColumn
=
0
;
}
else
if
(
column
===
<
number
>
types
.
ViewColumn
.
Two
)
{
editorColumn
=
1
;
}
else
if
(
column
===
<
number
>
types
.
ViewColumn
.
Three
)
{
editorColumn
=
2
;
}
else
if
(
column
===
<
number
>
types
.
ViewColumn
.
Active
)
{
}
else
{
// in any other case (no column or ViewColumn.Active), leave the
// editorColumn as undefined which signals to use the active column
editorColumn
=
undefined
;
}
return
editorColumn
;
}
export
function
to
(
position
?:
EditorViewColumn
):
vscode
.
ViewColumn
{
if
(
typeof
position
!==
'
number
'
)
{
return
undefined
;
}
if
(
position
===
0
)
{
return
<
number
>
types
.
ViewColumn
.
One
;
}
else
if
(
position
===
1
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录