Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
9b18dc50
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
9b18dc50
编写于
7月 08, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adopt ITextEditorOptions
上级
273159c1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
16 deletion
+11
-16
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+1
-0
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+1
-9
src/vs/workbench/services/history/browser/history.ts
src/vs/workbench/services/history/browser/history.ts
+9
-7
未找到文件。
src/vs/workbench/common/editor.ts
浏览文件 @
9b18dc50
...
...
@@ -494,6 +494,7 @@ export class TextEditorOptions extends EditorOptions {
protected
startColumn
:
number
;
protected
endLineNumber
:
number
;
protected
endColumn
:
number
;
private
editorViewState
:
IEditorViewState
;
public
static
from
(
input
:
IResourceInput
):
TextEditorOptions
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
9b18dc50
...
...
@@ -826,15 +826,7 @@ export class DebugService implements debug.IDebugService {
// Display the error from debug adapter using a temporary editor #8836
return
this
.
getDebugStringEditorInput
(
source
,
err
.
message
,
MIME_TEXT
);
}).
then
(
editorInput
=>
{
return
this
.
editorService
.
openEditor
(
editorInput
,
wbeditorcommon
.
TextEditorOptions
.
create
({
selection
:
{
startLineNumber
:
lineNumber
,
startColumn
:
1
,
endLineNumber
:
lineNumber
,
endColumn
:
1
},
preserveFocus
:
preserveFocus
}),
sideBySide
);
return
this
.
editorService
.
openEditor
(
editorInput
,
{
preserveFocus
,
selection
:
{
startLineNumber
:
lineNumber
,
startColumn
:
1
,
endLineNumber
:
lineNumber
,
endColumn
:
1
}
},
sideBySide
);
});
}
...
...
src/vs/workbench/services/history/browser/history.ts
浏览文件 @
9b18dc50
...
...
@@ -10,12 +10,12 @@ import platform = require('vs/base/common/platform');
import
nls
=
require
(
'
vs/nls
'
);
import
{
EventType
}
from
'
vs/base/common/events
'
;
import
{
IEditor
as
IBaseEditor
}
from
'
vs/platform/editor/common/editor
'
;
import
{
TextEditorOptions
,
EditorInput
,
IGroupEvent
,
IEditorRegistry
,
Extensions
}
from
'
vs/workbench/common/editor
'
;
import
{
EditorInput
,
IGroupEvent
,
IEditorRegistry
,
Extensions
}
from
'
vs/workbench/common/editor
'
;
import
{
BaseTextEditor
}
from
'
vs/workbench/browser/parts/editor/textEditor
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
{
Position
,
IEditorInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
Position
,
IEditorInput
,
ITextEditorOptions
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEventService
}
from
'
vs/platform/event/common/event
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -207,7 +207,7 @@ export abstract class BaseHistoryService {
interface
IStackEntry
{
input
:
IEditorInput
;
options
?:
TextEditorOptions
;
options
?:
I
TextEditorOptions
;
}
export
class
HistoryService
extends
BaseHistoryService
implements
IHistoryService
{
...
...
@@ -441,10 +441,12 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
if
(
!
this
.
currentFileEditorState
||
this
.
currentFileEditorState
.
justifiesNewPushState
(
stateCandidate
))
{
this
.
currentFileEditorState
=
stateCandidate
;
let
options
:
TextEditorOptions
;
let
options
:
I
TextEditorOptions
;
if
(
storeSelection
)
{
options
=
new
TextEditorOptions
();
options
.
selection
(
editor
.
getSelection
().
startLineNumber
,
editor
.
getSelection
().
startColumn
);
const
selection
=
editor
.
getSelection
();
options
=
{
selection
:
{
startLineNumber
:
selection
.
startLineNumber
,
startColumn
:
selection
.
startColumn
}
};
}
this
.
addToStack
(
editor
.
input
,
options
);
...
...
@@ -460,7 +462,7 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
this
.
addToStack
(
editor
.
input
);
}
private
addToStack
(
input
:
IEditorInput
,
options
?:
TextEditorOptions
):
void
{
private
addToStack
(
input
:
IEditorInput
,
options
?:
I
TextEditorOptions
):
void
{
// Overwrite an entry in the stack if we have a matching input that comes
// with editor options to indicate that this entry is more specific.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录