Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
580088df
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,发现更多精彩内容 >>
提交
580088df
编写于
8月 06, 2019
作者:
P
Peng Lyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Re #78168. Folding, find, color picker, dnd
上级
130499db
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
42 addition
and
26 deletion
+42
-26
src/vs/editor/contrib/caretOperations/moveCaretCommand.ts
src/vs/editor/contrib/caretOperations/moveCaretCommand.ts
+6
-2
src/vs/editor/contrib/colorPicker/colorPickerWidget.ts
src/vs/editor/contrib/colorPicker/colorPickerWidget.ts
+3
-3
src/vs/editor/contrib/dnd/dragAndDropCommand.ts
src/vs/editor/contrib/dnd/dragAndDropCommand.ts
+3
-2
src/vs/editor/contrib/find/findWidget.ts
src/vs/editor/contrib/find/findWidget.ts
+15
-15
src/vs/editor/contrib/find/replaceAllCommand.ts
src/vs/editor/contrib/find/replaceAllCommand.ts
+3
-2
src/vs/editor/contrib/find/test/findController.test.ts
src/vs/editor/contrib/find/test/findController.test.ts
+1
-1
src/vs/editor/contrib/folding/folding.ts
src/vs/editor/contrib/folding/folding.ts
+9
-0
src/vs/editor/contrib/folding/foldingRanges.ts
src/vs/editor/contrib/folding/foldingRanges.ts
+2
-1
未找到文件。
src/vs/editor/contrib/caretOperations/moveCaretCommand.ts
浏览文件 @
580088df
...
...
@@ -17,11 +17,15 @@ export class MoveCaretCommand implements ICommand {
private
_cutEndIndex
:
number
;
private
_moved
:
boolean
;
private
_selectionId
:
string
;
private
_selectionId
:
string
|
null
;
constructor
(
selection
:
Selection
,
isMovingLeft
:
boolean
)
{
this
.
_selection
=
selection
;
this
.
_isMovingLeft
=
isMovingLeft
;
this
.
_cutStartIndex
=
-
1
;
this
.
_cutEndIndex
=
-
1
;
this
.
_moved
=
false
;
this
.
_selectionId
=
null
;
}
public
getEditOperations
(
model
:
ITextModel
,
builder
:
IEditOperationBuilder
):
void
{
...
...
@@ -64,7 +68,7 @@ export class MoveCaretCommand implements ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
ICursorStateComputerData
):
Selection
{
let
result
=
helper
.
getTrackedSelection
(
this
.
_selectionId
);
let
result
=
helper
.
getTrackedSelection
(
this
.
_selectionId
!
);
if
(
this
.
_moved
)
{
result
=
result
.
setStartPosition
(
result
.
startLineNumber
,
this
.
_cutStartIndex
);
result
=
result
.
setEndPosition
(
result
.
startLineNumber
,
this
.
_cutEndIndex
);
...
...
src/vs/editor/contrib/colorPicker/colorPickerWidget.ts
浏览文件 @
580088df
...
...
@@ -123,8 +123,8 @@ class SaturationBox extends Disposable {
private
readonly
domNode
:
HTMLElement
;
private
readonly
selection
:
HTMLElement
;
private
readonly
canvas
:
HTMLCanvasElement
;
private
width
:
number
;
private
height
:
number
;
private
width
!
:
number
;
private
height
!
:
number
;
private
monitor
:
GlobalMouseMoveMonitor
<
IStandardMouseMoveEventData
>
|
null
;
private
_onDidChange
=
new
Emitter
<
{
s
:
number
,
v
:
number
}
>
();
...
...
@@ -235,7 +235,7 @@ abstract class Strip extends Disposable {
protected
domNode
:
HTMLElement
;
protected
overlay
:
HTMLElement
;
protected
slider
:
HTMLElement
;
private
height
:
number
;
private
height
!
:
number
;
private
_onDidChange
=
new
Emitter
<
number
>
();
readonly
onDidChange
:
Event
<
number
>
=
this
.
_onDidChange
.
event
;
...
...
src/vs/editor/contrib/dnd/dragAndDropCommand.ts
浏览文件 @
580088df
...
...
@@ -14,13 +14,14 @@ export class DragAndDropCommand implements editorCommon.ICommand {
private
readonly
selection
:
Selection
;
private
readonly
targetPosition
:
Position
;
private
targetSelection
:
Selection
;
private
targetSelection
:
Selection
|
null
;
private
readonly
copy
:
boolean
;
constructor
(
selection
:
Selection
,
targetPosition
:
Position
,
copy
:
boolean
)
{
this
.
selection
=
selection
;
this
.
targetPosition
=
targetPosition
;
this
.
copy
=
copy
;
this
.
targetSelection
=
null
;
}
public
getEditOperations
(
model
:
ITextModel
,
builder
:
editorCommon
.
IEditOperationBuilder
):
void
{
...
...
@@ -102,6 +103,6 @@ export class DragAndDropCommand implements editorCommon.ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
editorCommon
.
ICursorStateComputerData
):
Selection
{
return
this
.
targetSelection
;
return
this
.
targetSelection
!
;
}
}
src/vs/editor/contrib/find/findWidget.ts
浏览文件 @
580088df
...
...
@@ -93,19 +93,19 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
private
readonly
_keybindingService
:
IKeybindingService
;
private
readonly
_contextKeyService
:
IContextKeyService
;
private
_domNode
:
HTMLElement
;
private
_findInput
:
FindInput
;
private
_replaceInputBox
:
HistoryInputBox
;
private
_toggleReplaceBtn
:
SimpleButton
;
private
_matchesCount
:
HTMLElement
;
private
_prevBtn
:
SimpleButton
;
private
_nextBtn
:
SimpleButton
;
private
_toggleSelectionFind
:
SimpleCheckbox
;
private
_closeBtn
:
SimpleButton
;
private
_preserveCase
:
Checkbox
;
private
_replaceBtn
:
SimpleButton
;
private
_replaceAllBtn
:
SimpleButton
;
private
_domNode
!
:
HTMLElement
;
private
_findInput
!
:
FindInput
;
private
_replaceInputBox
!
:
HistoryInputBox
;
private
_toggleReplaceBtn
!
:
SimpleButton
;
private
_matchesCount
!
:
HTMLElement
;
private
_prevBtn
!
:
SimpleButton
;
private
_nextBtn
!
:
SimpleButton
;
private
_toggleSelectionFind
!
:
SimpleCheckbox
;
private
_closeBtn
!
:
SimpleButton
;
private
_preserveCase
!
:
Checkbox
;
private
_replaceBtn
!
:
SimpleButton
;
private
_replaceAllBtn
!
:
SimpleButton
;
private
_isVisible
:
boolean
;
private
_isReplaceVisible
:
boolean
;
...
...
@@ -118,8 +118,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
private
_viewZone
?:
FindWidgetViewZone
;
private
_viewZoneId
?:
number
;
private
_resizeSash
:
Sash
;
private
_resized
:
boolean
;
private
_resizeSash
!
:
Sash
;
private
_resized
!
:
boolean
;
private
readonly
_updateHistoryDelayer
:
Delayer
<
void
>
;
constructor
(
...
...
src/vs/editor/contrib/find/replaceAllCommand.ts
浏览文件 @
580088df
...
...
@@ -16,7 +16,7 @@ interface IEditOperation {
export
class
ReplaceAllCommand
implements
editorCommon
.
ICommand
{
private
readonly
_editorSelection
:
Selection
;
private
_trackedEditorSelectionId
:
string
;
private
_trackedEditorSelectionId
:
string
|
null
;
private
readonly
_ranges
:
Range
[];
private
readonly
_replaceStrings
:
string
[];
...
...
@@ -24,6 +24,7 @@ export class ReplaceAllCommand implements editorCommon.ICommand {
this
.
_editorSelection
=
editorSelection
;
this
.
_ranges
=
ranges
;
this
.
_replaceStrings
=
replaceStrings
;
this
.
_trackedEditorSelectionId
=
null
;
}
public
getEditOperations
(
model
:
ITextModel
,
builder
:
editorCommon
.
IEditOperationBuilder
):
void
{
...
...
@@ -66,6 +67,6 @@ export class ReplaceAllCommand implements editorCommon.ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
editorCommon
.
ICursorStateComputerData
):
Selection
{
return
helper
.
getTrackedSelection
(
this
.
_trackedEditorSelectionId
);
return
helper
.
getTrackedSelection
(
this
.
_trackedEditorSelectionId
!
);
}
}
src/vs/editor/contrib/find/test/findController.test.ts
浏览文件 @
580088df
...
...
@@ -24,7 +24,6 @@ export class TestFindController extends CommonFindController {
public
hasFocus
:
boolean
;
public
delayUpdateHistory
:
boolean
=
false
;
public
delayedUpdateHistoryPromise
:
Promise
<
void
>
;
private
_findInputFocused
:
IContextKey
<
boolean
>
;
...
...
@@ -37,6 +36,7 @@ export class TestFindController extends CommonFindController {
super
(
editor
,
contextKeyService
,
storageService
,
clipboardService
);
this
.
_findInputFocused
=
CONTEXT_FIND_INPUT_FOCUSED
.
bindTo
(
contextKeyService
);
this
.
_updateHistoryDelayer
=
new
Delayer
<
void
>
(
50
);
this
.
hasFocus
=
false
;
}
protected
_start
(
opts
:
IFindStartOptions
):
void
{
...
...
src/vs/editor/contrib/folding/folding.ts
浏览文件 @
580088df
...
...
@@ -90,6 +90,15 @@ export class FoldingController extends Disposable implements IEditorContribution
this
.
_autoHideFoldingControls
=
this
.
editor
.
getConfiguration
().
contribInfo
.
showFoldingControls
===
'
mouseover
'
;
this
.
_useFoldingProviders
=
this
.
editor
.
getConfiguration
().
contribInfo
.
foldingStrategy
!==
'
indentation
'
;
this
.
foldingModel
=
null
;
this
.
hiddenRangeModel
=
null
;
this
.
rangeProvider
=
null
;
this
.
foldingRegionPromise
=
null
;
this
.
foldingStateMemento
=
null
;
this
.
foldingModelPromise
=
null
;
this
.
updateScheduler
=
null
;
this
.
cursorChangedScheduler
=
null
;
this
.
mouseDownInfo
=
null
;
this
.
foldingDecorationProvider
=
new
FoldingDecorationProvider
(
editor
);
this
.
foldingDecorationProvider
.
autoHideFoldingControls
=
this
.
_autoHideFoldingControls
;
...
...
src/vs/editor/contrib/folding/foldingRanges.ts
浏览文件 @
580088df
...
...
@@ -28,6 +28,7 @@ export class FoldingRegions {
this
.
_endIndexes
=
endIndexes
;
this
.
_collapseStates
=
new
Uint32Array
(
Math
.
ceil
(
startIndexes
.
length
/
32
));
this
.
_types
=
types
;
this
.
_parentsComputed
=
false
;
}
private
ensureParentIndices
()
{
...
...
@@ -186,4 +187,4 @@ export class FoldingRegion {
hidesLine
(
lineNumber
:
number
)
{
return
this
.
startLineNumber
<
lineNumber
&&
lineNumber
<=
this
.
endLineNumber
;
}
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录