Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
f992a924
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,发现更多精彩内容 >>
提交
f992a924
编写于
12月 10, 2015
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tweaks for PR #1051: simplify view logic, renames, also add scroll page up/down
上级
0006d5d8
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
66 addition
and
77 deletion
+66
-77
src/vs/editor/browser/viewParts/lines/viewLines.ts
src/vs/editor/browser/viewParts/lines/viewLines.ts
+3
-18
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+4
-4
src/vs/editor/common/config/config.ts
src/vs/editor/common/config/config.ts
+7
-0
src/vs/editor/common/config/defaultConfig.ts
src/vs/editor/common/config/defaultConfig.ts
+1
-1
src/vs/editor/common/controller/cursor.ts
src/vs/editor/common/controller/cursor.ts
+27
-23
src/vs/editor/common/controller/oneCursor.ts
src/vs/editor/common/controller/oneCursor.ts
+1
-11
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+12
-9
src/vs/editor/common/viewModel/viewEventHandler.ts
src/vs/editor/common/viewModel/viewEventHandler.ts
+3
-3
src/vs/editor/common/viewModel/viewModel.ts
src/vs/editor/common/viewModel/viewModel.ts
+4
-4
src/vs/editor/common/viewModel/viewModelCursors.ts
src/vs/editor/common/viewModel/viewModelCursors.ts
+4
-4
未找到文件。
src/vs/editor/browser/viewParts/lines/viewLines.ts
浏览文件 @
f992a924
...
...
@@ -115,24 +115,9 @@ export class ViewLines extends ViewLayer {
return
true
;
}
public
onCursorLineScroll
(
e
:
EditorCommon
.
IViewLineScrollEvent
):
boolean
{
var
currentViewport
=
this
.
_layoutProvider
.
getCurrentViewport
();
var
residualOffset
=
currentViewport
.
top
-
this
.
_layoutProvider
.
getVerticalOffsetForLineNumber
(
this
.
_currentVisibleRange
.
startLineNumber
);
var
newTopLineNumber
:
number
;
if
(
e
.
lineOffset
<
0
)
{
newTopLineNumber
=
this
.
_currentVisibleRange
.
startLineNumber
+
e
.
lineOffset
;
if
(
newTopLineNumber
<
1
)
{
newTopLineNumber
=
1
;
residualOffset
=
0
;
}
}
else
{
newTopLineNumber
=
this
.
_currentVisibleRange
.
startLineNumber
+
e
.
lineOffset
;
if
(
newTopLineNumber
>
this
.
_currentVisibleRange
.
endLineNumber
)
{
newTopLineNumber
=
this
.
_currentVisibleRange
.
endLineNumber
;
residualOffset
=
0
;
}
}
var
newScrollTop
=
this
.
_layoutProvider
.
getVerticalOffsetForLineNumber
(
newTopLineNumber
)
+
residualOffset
;
public
onCursorScrollRequest
(
e
:
EditorCommon
.
IViewScrollRequestEvent
):
boolean
{
let
currentScrollTop
=
this
.
_layoutProvider
.
getScrollTop
();
let
newScrollTop
=
currentScrollTop
+
e
.
deltaLines
*
this
.
_context
.
configuration
.
editor
.
lineHeight
;
this
.
_layoutProvider
.
setScrollTop
(
newScrollTop
);
return
true
;
}
...
...
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
f992a924
...
...
@@ -166,7 +166,7 @@ class InternalEditorOptionsHelper {
outlineMarkers
:
toBoolean
(
opts
.
outlineMarkers
),
referenceInfos
:
toBoolean
(
opts
.
referenceInfos
),
renderWhitespace
:
toBoolean
(
opts
.
renderWhitespace
),
scrollCursorWithLine
:
toBoolean
(
opts
.
scrollCursorWithLine
),
moveCursorWhenScrolling
:
toBoolean
(
opts
.
moveCursorWhenScrolling
),
layoutInfo
:
layoutInfo
,
stylingInfo
:
{
...
...
@@ -818,10 +818,10 @@ configurationRegistry.registerConfiguration({
'
default
'
:
DefaultConfig
.
editor
.
referenceInfos
,
'
description
'
:
nls
.
localize
(
'
referenceInfos
'
,
"
Controls if the editor shows reference information for the modes that support it
"
)
},
'
editor.
scrollCursorWithLine
'
:
{
'
editor.
moveCursorWhenScrolling
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
DefaultConfig
.
editor
.
scrollCursorWithLine
,
'
description
'
:
nls
.
localize
(
'
scrollCursorWithLine
'
,
"
Controls if the edition cursor moves when the user scrolls the editor line by line
"
)
'
default
'
:
DefaultConfig
.
editor
.
moveCursorWhenScrolling
,
'
description
'
:
nls
.
localize
(
'
moveCursorWhenScrolling
'
,
"
Controls if the edition cursor moves when the user scrolls the editor line by line
"
)
},
'
diffEditor.renderSideBySide
'
:
{
'
type
'
:
'
boolean
'
,
...
...
src/vs/editor/common/config/config.ts
浏览文件 @
f992a924
...
...
@@ -208,6 +208,13 @@ registerCoreCommand(H.ScrollLineDown, {
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
DownArrow
});
registerCoreCommand
(
H
.
ScrollPageUp
,
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
PageUp
});
registerCoreCommand
(
H
.
ScrollPageDown
,
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
PageDown
});
registerCoreCommand
(
H
.
Tab
,
{
primary
:
KeyCode
.
Tab
},
KeybindingsRegistry
.
WEIGHT
.
editorCore
(),
[
...
...
src/vs/editor/common/config/defaultConfig.ts
浏览文件 @
f992a924
...
...
@@ -62,7 +62,7 @@ class ConfigClass implements IConfiguration {
outlineMarkers
:
false
,
referenceInfos
:
true
,
renderWhitespace
:
false
,
scrollCursorWithLine
:
false
,
moveCursorWhenScrolling
:
false
,
tabSize
:
4
,
insertSpaces
:
true
,
...
...
src/vs/editor/common/controller/cursor.ts
浏览文件 @
f992a924
...
...
@@ -41,7 +41,7 @@ interface IMultipleCursorOperationContext {
isCursorUndo
:
boolean
;
executeCommands
:
EditorCommon
.
ICommand
[];
postOperationRunnables
:
IPostOperationRunnable
[];
lineScrollOffset
:
number
;
requestScrollDeltaLines
:
number
;
}
interface
IExecContext
{
...
...
@@ -87,7 +87,7 @@ export class Cursor extends EventEmitter {
EditorCommon
.
EventType
.
CursorPositionChanged
,
EditorCommon
.
EventType
.
CursorSelectionChanged
,
EditorCommon
.
EventType
.
CursorRevealRange
,
EditorCommon
.
EventType
.
Cursor
LineScroll
EditorCommon
.
EventType
.
Cursor
ScrollRequest
]);
this
.
editorId
=
editorId
;
this
.
configuration
=
configuration
;
...
...
@@ -309,7 +309,7 @@ export class Cursor extends EventEmitter {
postOperationRunnables
:
[],
shouldPushStackElementBefore
:
false
,
shouldPushStackElementAfter
:
false
,
lineScrollOffset
:
0
requestScrollDeltaLines
:
0
};
callback
(
currentHandlerCtx
);
...
...
@@ -339,7 +339,7 @@ export class Cursor extends EventEmitter {
var
shouldRevealHorizontal
:
boolean
;
var
shouldRevealTarget
:
RevealTarget
;
var
isCursorUndo
:
boolean
;
var
lineScrollOffset
:
number
;
var
requestScrollDeltaLines
:
number
;
var
hasExecutedCommands
=
this
.
_createAndInterpretHandlerCtx
(
eventSource
,
e
.
getData
(),
(
currentHandlerCtx
:
IMultipleCursorOperationContext
)
=>
{
handled
=
handler
(
currentHandlerCtx
);
...
...
@@ -350,7 +350,7 @@ export class Cursor extends EventEmitter {
shouldRevealVerticalInCenter
=
currentHandlerCtx
.
shouldRevealVerticalInCenter
;
shouldRevealHorizontal
=
currentHandlerCtx
.
shouldRevealHorizontal
;
isCursorUndo
=
currentHandlerCtx
.
isCursorUndo
;
lineScrollOffset
=
currentHandlerCtx
.
lineScrollOffset
;
requestScrollDeltaLines
=
currentHandlerCtx
.
requestScrollDeltaLines
;
});
if
(
hasExecutedCommands
)
{
...
...
@@ -408,8 +408,8 @@ export class Cursor extends EventEmitter {
this
.
emitCursorSelectionChanged
(
eventSource
,
cursorPositionChangeReason
);
}
if
(
lineScrollOffset
)
{
this
.
emitCursor
LineScroll
(
lineScrollOffset
);
if
(
requestScrollDeltaLines
)
{
this
.
emitCursor
ScrollRequest
(
requestScrollDeltaLines
);
}
}
catch
(
err
)
{
Errors
.
onUnexpectedError
(
err
);
...
...
@@ -854,11 +854,11 @@ export class Cursor extends EventEmitter {
this
.
emit
(
EditorCommon
.
EventType
.
CursorSelectionChanged
,
e
);
}
private
emitCursor
LineScroll
(
lineScrollOffset
:
number
):
void
{
var
e
:
EditorCommon
.
ICursor
LineScroll
Event
=
{
lineOffset
:
lineScrollOffset
private
emitCursor
ScrollRequest
(
lineScrollOffset
:
number
):
void
{
var
e
:
EditorCommon
.
ICursor
ScrollRequest
Event
=
{
deltaLines
:
lineScrollOffset
};
this
.
emit
(
EditorCommon
.
EventType
.
Cursor
LineScroll
,
e
);
this
.
emit
(
EditorCommon
.
EventType
.
Cursor
ScrollRequest
,
e
);
}
private
emitCursorRevealRange
(
revealTarget
:
RevealTarget
,
verticalType
:
EditorCommon
.
VerticalRevealType
,
revealHorizontal
:
boolean
):
void
{
...
...
@@ -974,8 +974,10 @@ export class Cursor extends EventEmitter {
handlersMap
[
H
.
Outdent
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_outdent
(
ctx
);
handlersMap
[
H
.
Paste
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_paste
(
ctx
);
handlersMap
[
H
.
ScrollLineUp
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_scrollLineUp
(
ctx
);
handlersMap
[
H
.
ScrollLineDown
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_scrollLineDown
(
ctx
);
handlersMap
[
H
.
ScrollLineUp
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_scrollUp
(
false
,
ctx
);
handlersMap
[
H
.
ScrollLineDown
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_scrollDown
(
false
,
ctx
);
handlersMap
[
H
.
ScrollPageUp
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_scrollUp
(
true
,
ctx
);
handlersMap
[
H
.
ScrollPageDown
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_scrollDown
(
true
,
ctx
);
handlersMap
[
H
.
DeleteLeft
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_deleteLeft
(
ctx
);
handlersMap
[
H
.
DeleteWordLeft
]
=
(
ctx
:
IMultipleCursorOperationContext
)
=>
this
.
_deleteWordLeft
(
ctx
);
...
...
@@ -1024,7 +1026,7 @@ export class Cursor extends EventEmitter {
postOperationRunnable
:
null
,
shouldPushStackElementBefore
:
false
,
shouldPushStackElementAfter
:
false
,
lineScrollOffset
:
0
requestScrollDeltaLines
:
0
};
result
=
callable
(
i
,
cursors
[
i
],
context
)
||
result
;
...
...
@@ -1034,7 +1036,7 @@ export class Cursor extends EventEmitter {
ctx
.
shouldRevealHorizontal
=
context
.
shouldRevealHorizontal
;
ctx
.
shouldReveal
=
context
.
shouldReveal
;
ctx
.
shouldRevealVerticalInCenter
=
context
.
shouldRevealVerticalInCenter
;
ctx
.
lineScrollOffset
=
context
.
lineScrollOffset
;
ctx
.
requestScrollDeltaLines
=
context
.
requestScrollDeltaLines
;
}
ctx
.
shouldPushStackElementBefore
=
ctx
.
shouldPushStackElementBefore
||
context
.
shouldPushStackElementBefore
;
...
...
@@ -1319,18 +1321,20 @@ export class Cursor extends EventEmitter {
}
}
private
_scrollLineUp
(
ctx
:
IMultipleCursorOperationContext
):
boolean
{
if
(
this
.
configuration
.
editor
.
scrollCursorWithLine
)
{
if
(
!
this
.
_moveUp
(
false
,
false
,
ctx
))
return
false
;
private
_scrollUp
(
isPaged
:
boolean
,
ctx
:
IMultipleCursorOperationContext
):
boolean
{
if
(
this
.
configuration
.
editor
.
moveCursorWhenScrolling
)
{
if
(
!
this
.
_moveUp
(
false
,
isPaged
,
ctx
))
{
return
false
;
}
}
return
this
.
_invokeForAll
(
ctx
,
(
cursorIndex
:
number
,
oneCursor
:
OneCursor
,
oneCtx
:
IOneCursorOperationContext
)
=>
OneCursorOp
.
scrollLineUp
(
oneCursor
,
oneCtx
))
;
ctx
.
requestScrollDeltaLines
=
isPaged
?
-
this
.
configuration
.
editor
.
pageSize
:
-
1
;
}
private
_scroll
LineDown
(
ctx
:
IMultipleCursorOperationContext
):
boolean
{
if
(
this
.
configuration
.
editor
.
scrollCursorWithLine
)
{
if
(
!
this
.
_moveDown
(
false
,
false
,
ctx
))
return
false
;
private
_scroll
Down
(
isPaged
:
boolean
,
ctx
:
IMultipleCursorOperationContext
):
boolean
{
if
(
this
.
configuration
.
editor
.
moveCursorWhenScrolling
)
{
if
(
!
this
.
_moveDown
(
false
,
isPaged
,
ctx
))
return
false
;
}
return
this
.
_invokeForAll
(
ctx
,
(
cursorIndex
:
number
,
oneCursor
:
OneCursor
,
oneCtx
:
IOneCursorOperationContext
)
=>
OneCursorOp
.
scrollLineDown
(
oneCursor
,
oneCtx
))
;
ctx
.
requestScrollDeltaLines
=
isPaged
?
this
.
configuration
.
editor
.
pageSize
:
1
;
}
private
_distributePasteToCursors
(
ctx
:
IMultipleCursorOperationContext
):
string
[]
{
...
...
src/vs/editor/common/controller/oneCursor.ts
浏览文件 @
f992a924
...
...
@@ -30,7 +30,7 @@ export interface IOneCursorOperationContext {
shouldPushStackElementAfter
:
boolean
;
executeCommand
:
EditorCommon
.
ICommand
;
postOperationRunnable
:
IPostOperationRunnable
;
lineScrollOffset
:
number
;
requestScrollDeltaLines
:
number
;
}
export
interface
IModeConfiguration
{
...
...
@@ -1335,16 +1335,6 @@ export class OneCursorOp {
return
true
;
}
public
static
scrollLineUp
(
cursor
:
OneCursor
,
ctx
:
IOneCursorOperationContext
):
boolean
{
ctx
.
lineScrollOffset
=
-
1
;
return
true
;
}
public
static
scrollLineDown
(
cursor
:
OneCursor
,
ctx
:
IOneCursorOperationContext
):
boolean
{
ctx
.
lineScrollOffset
=
+
1
;
return
true
;
}
public
static
paste
(
cursor
:
OneCursor
,
text
:
string
,
pasteOnNewLine
:
boolean
,
ctx
:
IOneCursorOperationContext
):
boolean
{
let
position
=
cursor
.
getPosition
();
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
f992a924
...
...
@@ -486,7 +486,7 @@ export interface ICommonEditorOptions {
* Make the cursor move with scrolling.
* Defaults to false.
*/
scrollCursorWithLine
?:
boolean
;
moveCursorWhenScrolling
?:
boolean
;
}
/**
...
...
@@ -615,7 +615,7 @@ export interface IInternalEditorOptions {
outlineMarkers
:
boolean
;
referenceInfos
:
boolean
;
renderWhitespace
:
boolean
;
scrollCursorWithLine
:
boolean
;
moveCursorWhenScrolling
:
boolean
;
// ---- Options that are computed
...
...
@@ -2067,8 +2067,8 @@ export interface ICursorRevealRangeEvent {
revealHorizontal
:
boolean
;
}
export
interface
ICursor
LineScroll
Event
{
lineOffset
:
number
;
export
interface
ICursor
ScrollRequest
Event
{
deltaLines
:
number
;
}
export
interface
IModelChangedEvent
{
...
...
@@ -2513,7 +2513,7 @@ export var ViewEventNames = {
CursorSelectionChangedEvent
:
'
cursorSelectionChangedEvent
'
,
RevealRangeEvent
:
'
revealRangeEvent
'
,
LineMappingChangedEvent
:
'
lineMappingChangedEvent
'
,
LineScrollEvent
:
'
lineScroll
Event
'
ScrollRequestEvent
:
'
scrollRequest
Event
'
};
export
interface
IScrollEvent
{
...
...
@@ -2610,8 +2610,8 @@ export interface IViewRevealRangeEvent {
revealHorizontal
:
boolean
;
}
export
interface
IView
LineScroll
Event
{
lineOffset
:
number
;
export
interface
IView
ScrollRequest
Event
{
deltaLines
:
number
;
}
export
interface
IViewWhitespaceViewportData
{
...
...
@@ -3246,7 +3246,7 @@ export var EventType = {
CursorPositionChanged
:
'
positionChanged
'
,
CursorSelectionChanged
:
'
selectionChanged
'
,
CursorRevealRange
:
'
revealRange
'
,
Cursor
LineScroll
:
'
lineScroll
'
,
Cursor
ScrollRequest
:
'
scrollRequest
'
,
ViewFocusGained
:
'
focusGained
'
,
ViewFocusLost
:
'
focusLost
'
,
...
...
@@ -3357,5 +3357,8 @@ export var Handler = {
SelectAll
:
'
selectAll
'
,
ScrollLineUp
:
'
scrollLineUp
'
,
ScrollLineDown
:
'
scrollLineDown
'
ScrollLineDown
:
'
scrollLineDown
'
,
ScrollPageUp
:
'
scrollPageUp
'
,
ScrollPageDown
:
'
scrollPageDown
'
};
src/vs/editor/common/viewModel/viewEventHandler.ts
浏览文件 @
f992a924
...
...
@@ -47,7 +47,7 @@ export class ViewEventHandler {
public
onCursorRevealRange
(
e
:
EditorCommon
.
IViewRevealRangeEvent
):
boolean
{
return
false
;
}
public
onCursor
LineScroll
(
e
:
EditorCommon
.
IViewLineScroll
Event
):
boolean
{
public
onCursor
ScrollRequest
(
e
:
EditorCommon
.
IViewScrollRequest
Event
):
boolean
{
return
false
;
}
public
onConfigurationChanged
(
e
:
EditorCommon
.
IConfigurationChangedEvent
):
boolean
{
...
...
@@ -126,8 +126,8 @@ export class ViewEventHandler {
this
.
shouldRender
=
this
.
onCursorRevealRange
(
<
EditorCommon
.
IViewRevealRangeEvent
>
data
)
||
this
.
shouldRender
;
break
;
case
EditorCommon
.
ViewEventNames
.
LineScroll
Event
:
this
.
shouldRender
=
this
.
onCursor
LineScroll
(
<
EditorCommon
.
IViewLineScroll
Event
>
data
)
||
this
.
shouldRender
;
case
EditorCommon
.
ViewEventNames
.
ScrollRequest
Event
:
this
.
shouldRender
=
this
.
onCursor
ScrollRequest
(
<
EditorCommon
.
IViewScrollRequest
Event
>
data
)
||
this
.
shouldRender
;
break
;
case
EditorCommon
.
EventType
.
ConfigurationChanged
:
...
...
src/vs/editor/common/viewModel/viewModel.ts
浏览文件 @
f992a924
...
...
@@ -235,8 +235,8 @@ export class ViewModel extends EventEmitter implements EditorCommon.IViewModel {
this
.
onCursorRevealRange
(
<
EditorCommon
.
ICursorRevealRangeEvent
>
data
);
break
;
case
EditorCommon
.
EventType
.
Cursor
LineScroll
:
this
.
onCursor
LineScroll
(
<
EditorCommon
.
ICursorLineScroll
Event
>
data
);
case
EditorCommon
.
EventType
.
Cursor
ScrollRequest
:
this
.
onCursor
ScrollRequest
(
<
EditorCommon
.
ICursorScrollRequest
Event
>
data
);
break
;
case
EditorCommon
.
EventType
.
ConfigurationChanged
:
...
...
@@ -343,8 +343,8 @@ export class ViewModel extends EventEmitter implements EditorCommon.IViewModel {
private
onCursorRevealRange
(
e
:
EditorCommon
.
ICursorRevealRangeEvent
):
void
{
this
.
cursors
.
onCursorRevealRange
(
e
,
(
eventType
:
string
,
payload
:
any
)
=>
this
.
emit
(
eventType
,
payload
));
}
private
onCursor
LineScroll
(
e
:
EditorCommon
.
ICursorLineScroll
Event
):
void
{
this
.
cursors
.
onCursor
LineScroll
(
e
,
(
eventType
:
string
,
payload
:
any
)
=>
this
.
emit
(
eventType
,
payload
));
private
onCursor
ScrollRequest
(
e
:
EditorCommon
.
ICursorScrollRequest
Event
):
void
{
this
.
cursors
.
onCursor
ScrollRequest
(
e
,
(
eventType
:
string
,
payload
:
any
)
=>
this
.
emit
(
eventType
,
payload
));
}
// --- end inbound event conversion
...
...
src/vs/editor/common/viewModel/viewModelCursors.ts
浏览文件 @
f992a924
...
...
@@ -105,11 +105,11 @@ export class ViewModelCursors {
emit
(
EditorCommon
.
ViewEventNames
.
RevealRangeEvent
,
newEvent
);
}
public
onCursor
LineScroll
(
e
:
EditorCommon
.
ICursorLineScroll
Event
,
emit
:(
eventType
:
string
,
payload
:
any
)
=>
void
):
void
{
var
newEvent
:
EditorCommon
.
IView
LineScroll
Event
=
{
lineOffset
:
e
.
lineOffset
public
onCursor
ScrollRequest
(
e
:
EditorCommon
.
ICursorScrollRequest
Event
,
emit
:(
eventType
:
string
,
payload
:
any
)
=>
void
):
void
{
var
newEvent
:
EditorCommon
.
IView
ScrollRequest
Event
=
{
deltaLines
:
e
.
deltaLines
};
emit
(
EditorCommon
.
ViewEventNames
.
LineScroll
Event
,
newEvent
);
emit
(
EditorCommon
.
ViewEventNames
.
ScrollRequest
Event
,
newEvent
);
}
public
onLineMappingChanged
(
emit
:(
eventType
:
string
,
payload
:
any
)
=>
void
):
void
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录