Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f9775c5f
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,发现更多精彩内容 >>
提交
f9775c5f
编写于
12月 10, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Strict null checking findWidget
上级
15413532
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
101 addition
and
88 deletion
+101
-88
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+3
-1
src/vs/base/browser/ui/findinput/findInput.ts
src/vs/base/browser/ui/findinput/findInput.ts
+21
-21
src/vs/base/browser/ui/inputbox/inputBox.ts
src/vs/base/browser/ui/inputbox/inputBox.ts
+28
-28
src/vs/editor/contrib/find/findWidget.ts
src/vs/editor/contrib/find/findWidget.ts
+47
-36
src/vs/platform/widget/browser/contextScopedHistoryWidget.ts
src/vs/platform/widget/browser/contextScopedHistoryWidget.ts
+2
-2
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
f9775c5f
...
...
@@ -295,6 +295,7 @@
"./vs/editor/contrib/find/findModel.ts"
,
"./vs/editor/contrib/find/findOptionsWidget.ts"
,
"./vs/editor/contrib/find/findState.ts"
,
"./vs/editor/contrib/find/findWidget.ts"
,
"./vs/editor/contrib/find/replaceAllCommand.ts"
,
"./vs/editor/contrib/find/replacePattern.ts"
,
"./vs/editor/contrib/folding/folding.ts"
,
...
...
@@ -505,6 +506,7 @@
"./vs/platform/statusbar/common/statusbar.ts"
,
"./vs/platform/storage/common/storage.ts"
,
"./vs/platform/storage/node/storageMainService.ts"
,
"./vs/platform/storage/node/storageService.ts"
,
"./vs/platform/telemetry/browser/errorTelemetry.ts"
,
"./vs/platform/telemetry/common/telemetry.ts"
,
"./vs/platform/telemetry/common/telemetryService.ts"
,
...
...
@@ -746,4 +748,4 @@
"exclude"
:
[
"./typings/require-monaco.d.ts"
]
}
}
\ No newline at end of file
src/vs/base/browser/ui/findinput/findInput.ts
浏览文件 @
f9775c5f
...
...
@@ -32,7 +32,7 @@ export interface IFindInputOptions extends IFindInputStyles {
}
export
interface
IFindInputStyles
extends
IInputBoxStyles
{
inputActiveOptionBorder
?:
Color
;
inputActiveOptionBorder
?:
Color
|
null
;
}
const
NLS_DEFAULT_LABEL
=
nls
.
localize
(
'
defaultLabel
'
,
"
input
"
);
...
...
@@ -48,20 +48,20 @@ export class FindInput extends Widget {
private
label
:
string
;
private
fixFocusOnOptionClickEnabled
=
true
;
private
inputActiveOptionBorder
?:
Color
;
private
inputBackground
?:
Color
;
private
inputForeground
?:
Color
;
private
inputBorder
?:
Color
;
private
inputValidationInfoBorder
?:
Color
;
private
inputValidationInfoBackground
?:
Color
;
private
inputValidationInfoForeground
?:
Color
;
private
inputValidationWarningBorder
?:
Color
;
private
inputValidationWarningBackground
?:
Color
;
private
inputValidationWarningForeground
?:
Color
;
private
inputValidationErrorBorder
?:
Color
;
private
inputValidationErrorBackground
?:
Color
;
private
inputValidationErrorForeground
?:
Color
;
private
inputActiveOptionBorder
?:
Color
|
null
;
private
inputBackground
?:
Color
|
null
;
private
inputForeground
?:
Color
|
null
;
private
inputBorder
?:
Color
|
null
;
private
inputValidationInfoBorder
?:
Color
|
null
;
private
inputValidationInfoBackground
?:
Color
|
null
;
private
inputValidationInfoForeground
?:
Color
|
null
;
private
inputValidationWarningBorder
?:
Color
|
null
;
private
inputValidationWarningBackground
?:
Color
|
null
;
private
inputValidationWarningForeground
?:
Color
|
null
;
private
inputValidationErrorBorder
?:
Color
|
null
;
private
inputValidationErrorBackground
?:
Color
|
null
;
private
inputValidationErrorForeground
?:
Color
|
null
;
private
regex
:
RegexCheckbox
;
private
wholeWords
:
WholeWordsCheckbox
;
...
...
@@ -90,7 +90,7 @@ export class FindInput extends Widget {
private
_onRegexKeyDown
=
this
.
_register
(
new
Emitter
<
IKeyboardEvent
>
());
public
readonly
onRegexKeyDown
:
Event
<
IKeyboardEvent
>
=
this
.
_onRegexKeyDown
.
event
;
constructor
(
parent
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
,
private
readonly
_showOptionButtons
:
boolean
,
options
:
IFindInputOptions
)
{
constructor
(
parent
:
HTMLElement
|
null
,
contextViewProvider
:
IContextViewProvider
,
private
readonly
_showOptionButtons
:
boolean
,
options
:
IFindInputOptions
)
{
super
();
this
.
contextViewProvider
=
contextViewProvider
;
this
.
width
=
options
.
width
||
100
;
...
...
@@ -115,7 +115,7 @@ export class FindInput extends Widget {
this
.
buildDomNode
(
options
.
appendCaseSensitiveLabel
||
''
,
options
.
appendWholeWordsLabel
||
''
,
options
.
appendRegexLabel
||
''
,
options
.
history
||
[],
!!
options
.
flexibleHeight
);
if
(
Boolean
(
parent
)
)
{
if
(
parent
)
{
parent
.
appendChild
(
this
.
domNode
);
}
...
...
@@ -202,7 +202,7 @@ export class FindInput extends Widget {
protected
applyStyles
():
void
{
if
(
this
.
domNode
)
{
const
checkBoxStyles
:
ICheckboxStyles
=
{
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
,
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
||
undefined
,
};
this
.
regex
.
style
(
checkBoxStyles
);
this
.
wholeWords
.
style
(
checkBoxStyles
);
...
...
@@ -313,7 +313,7 @@ export class FindInput extends Widget {
this
.
regex
=
this
.
_register
(
new
RegexCheckbox
({
appendTitle
:
appendRegexLabel
,
isChecked
:
false
,
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
||
undefined
}));
this
.
_register
(
this
.
regex
.
onChange
(
viaKeyboard
=>
{
this
.
_onDidOptionChange
.
fire
(
viaKeyboard
);
...
...
@@ -330,7 +330,7 @@ export class FindInput extends Widget {
this
.
wholeWords
=
this
.
_register
(
new
WholeWordsCheckbox
({
appendTitle
:
appendWholeWordsLabel
,
isChecked
:
false
,
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
||
undefined
}));
this
.
_register
(
this
.
wholeWords
.
onChange
(
viaKeyboard
=>
{
this
.
_onDidOptionChange
.
fire
(
viaKeyboard
);
...
...
@@ -344,7 +344,7 @@ export class FindInput extends Widget {
this
.
caseSensitive
=
this
.
_register
(
new
CaseSensitiveCheckbox
({
appendTitle
:
appendCaseSensitiveLabel
,
isChecked
:
false
,
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
inputActiveOptionBorder
:
this
.
inputActiveOptionBorder
||
undefined
}));
this
.
_register
(
this
.
caseSensitive
.
onChange
(
viaKeyboard
=>
{
this
.
_onDidOptionChange
.
fire
(
viaKeyboard
);
...
...
src/vs/base/browser/ui/inputbox/inputBox.ts
浏览文件 @
f9775c5f
...
...
@@ -32,22 +32,22 @@ export interface IInputOptions extends IInputBoxStyles {
}
export
interface
IInputBoxStyles
{
readonly
inputBackground
?:
Color
;
readonly
inputForeground
?:
Color
;
readonly
inputBorder
?:
Color
;
readonly
inputValidationInfoBorder
?:
Color
;
readonly
inputValidationInfoBackground
?:
Color
;
readonly
inputValidationInfoForeground
?:
Color
;
readonly
inputValidationWarningBorder
?:
Color
;
readonly
inputValidationWarningBackground
?:
Color
;
readonly
inputValidationWarningForeground
?:
Color
;
readonly
inputValidationErrorBorder
?:
Color
;
readonly
inputValidationErrorBackground
?:
Color
;
readonly
inputValidationErrorForeground
?:
Color
;
readonly
inputBackground
?:
Color
|
null
;
readonly
inputForeground
?:
Color
|
null
;
readonly
inputBorder
?:
Color
|
null
;
readonly
inputValidationInfoBorder
?:
Color
|
null
;
readonly
inputValidationInfoBackground
?:
Color
|
null
;
readonly
inputValidationInfoForeground
?:
Color
|
null
;
readonly
inputValidationWarningBorder
?:
Color
|
null
;
readonly
inputValidationWarningBackground
?:
Color
|
null
;
readonly
inputValidationWarningForeground
?:
Color
|
null
;
readonly
inputValidationErrorBorder
?:
Color
|
null
;
readonly
inputValidationErrorBackground
?:
Color
|
null
;
readonly
inputValidationErrorForeground
?:
Color
|
null
;
}
export
interface
IInputValidator
{
(
value
:
string
):
IMessage
;
(
value
:
string
):
IMessage
|
null
;
}
export
interface
IMessage
{
...
...
@@ -96,19 +96,19 @@ export class InputBox extends Widget {
private
state
:
string
|
null
=
'
idle
'
;
private
cachedHeight
:
number
|
null
;
private
inputBackground
?:
Color
;
private
inputForeground
?:
Color
;
private
inputBorder
?:
Color
;
private
inputBackground
?:
Color
|
null
;
private
inputForeground
?:
Color
|
null
;
private
inputBorder
?:
Color
|
null
;
private
inputValidationInfoBorder
?:
Color
;
private
inputValidationInfoBackground
?:
Color
;
private
inputValidationInfoForeground
?:
Color
;
private
inputValidationWarningBorder
?:
Color
;
private
inputValidationWarningBackground
?:
Color
;
private
inputValidationWarningForeground
?:
Color
;
private
inputValidationErrorBorder
?:
Color
;
private
inputValidationErrorBackground
?:
Color
;
private
inputValidationErrorForeground
?:
Color
;
private
inputValidationInfoBorder
?:
Color
|
null
;
private
inputValidationInfoBackground
?:
Color
|
null
;
private
inputValidationInfoForeground
?:
Color
|
null
;
private
inputValidationWarningBorder
?:
Color
|
null
;
private
inputValidationWarningBackground
?:
Color
|
null
;
private
inputValidationWarningForeground
?:
Color
|
null
;
private
inputValidationErrorBorder
?:
Color
|
null
;
private
inputValidationErrorBackground
?:
Color
|
null
;
private
inputValidationErrorForeground
?:
Color
|
null
;
private
_onDidChange
=
this
.
_register
(
new
Emitter
<
string
>
());
public
readonly
onDidChange
:
Event
<
string
>
=
this
.
_onDidChange
.
event
;
...
...
@@ -116,7 +116,7 @@ export class InputBox extends Widget {
private
_onDidHeightChange
=
this
.
_register
(
new
Emitter
<
number
>
());
public
readonly
onDidHeightChange
:
Event
<
number
>
=
this
.
_onDidHeightChange
.
event
;
constructor
(
container
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
,
options
?:
IInputOptions
)
{
constructor
(
container
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
|
undefined
,
options
?:
IInputOptions
)
{
super
();
this
.
contextViewProvider
=
contextViewProvider
;
...
...
@@ -361,7 +361,7 @@ export class InputBox extends Widget {
return
!
errorMsg
;
}
private
stylesForType
(
type
:
MessageType
|
undefined
):
{
border
:
Color
|
undefined
;
background
:
Color
|
undefined
;
foreground
:
Color
|
undefined
}
{
private
stylesForType
(
type
:
MessageType
|
undefined
):
{
border
:
Color
|
undefined
|
null
;
background
:
Color
|
undefined
|
null
;
foreground
:
Color
|
undefined
|
null
}
{
switch
(
type
)
{
case
MessageType
.
INFO
:
return
{
border
:
this
.
inputValidationInfoBorder
,
background
:
this
.
inputValidationInfoBackground
,
foreground
:
this
.
inputValidationInfoForeground
};
case
MessageType
.
WARNING
:
return
{
border
:
this
.
inputValidationWarningBorder
,
background
:
this
.
inputValidationWarningBackground
,
foreground
:
this
.
inputValidationWarningForeground
};
...
...
@@ -533,7 +533,7 @@ export class HistoryInputBox extends InputBox implements IHistoryNavigationWidge
private
readonly
history
:
HistoryNavigator
<
string
>
;
constructor
(
container
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
,
options
:
IHistoryInputOptions
)
{
constructor
(
container
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
|
undefined
,
options
:
IHistoryInputOptions
)
{
super
(
container
,
contextViewProvider
,
options
);
this
.
history
=
new
HistoryNavigator
<
string
>
(
options
.
history
,
100
);
}
...
...
src/vs/editor/contrib/find/findWidget.ts
浏览文件 @
f9775c5f
...
...
@@ -111,7 +111,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
private
_replaceFocusTracker
:
dom
.
IFocusTracker
;
private
_replaceInputFocused
:
IContextKey
<
boolean
>
;
private
_viewZone
:
FindWidgetViewZone
;
private
_viewZoneId
:
number
;
private
_viewZoneId
?
:
number
;
private
_resizeSash
:
Sash
;
private
_resized
:
boolean
;
...
...
@@ -210,7 +210,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
return
;
}
this
.
_codeEditor
.
changeViewZones
((
accessor
)
=>
{
accessor
.
removeZone
(
this
.
_viewZoneId
);
if
(
this
.
_viewZoneId
)
{
accessor
.
removeZone
(
this
.
_viewZoneId
);
}
this
.
_viewZoneId
=
undefined
;
});
}));
...
...
@@ -239,7 +241,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
return
this
.
_domNode
;
}
public
getPosition
():
IOverlayWidgetPosition
{
public
getPosition
():
IOverlayWidgetPosition
|
null
{
if
(
this
.
_isVisible
)
{
return
{
preference
:
OverlayWidgetPositionPreference
.
TOP_RIGHT_CORNER
...
...
@@ -401,8 +403,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
if
(
!
this
.
_isVisible
)
{
this
.
_isVisible
=
true
;
le
t
selection
=
this
.
_codeEditor
.
getSelection
();
le
t
isSelection
=
selection
?
(
selection
.
startLineNumber
!==
selection
.
endLineNumber
||
selection
.
startColumn
!==
selection
.
endColumn
)
:
false
;
cons
t
selection
=
this
.
_codeEditor
.
getSelection
();
cons
t
isSelection
=
selection
?
(
selection
.
startLineNumber
!==
selection
.
endLineNumber
||
selection
.
startColumn
!==
selection
.
endColumn
)
:
false
;
if
(
isSelection
&&
this
.
_codeEditor
.
getConfiguration
().
contribInfo
.
find
.
autoFindInSelection
)
{
this
.
_toggleSelectionFind
.
checked
=
true
;
}
else
{
...
...
@@ -425,24 +427,27 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
let
adjustEditorScrollTop
=
true
;
if
(
this
.
_codeEditor
.
getConfiguration
().
contribInfo
.
find
.
seedSearchStringFromSelection
&&
selection
)
{
let
editorCoords
=
dom
.
getDomNodePagePosition
(
this
.
_codeEditor
.
getDomNode
());
let
startCoords
=
this
.
_codeEditor
.
getScrolledVisiblePosition
(
selection
.
getStartPosition
());
let
startLeft
=
editorCoords
.
left
+
startCoords
.
left
;
let
startTop
=
startCoords
.
top
;
if
(
startTop
<
this
.
_viewZone
.
heightInPx
)
{
if
(
selection
.
endLineNumber
>
selection
.
startLineNumber
)
{
adjustEditorScrollTop
=
false
;
}
const
domNode
=
this
.
_codeEditor
.
getDomNode
();
if
(
domNode
)
{
const
editorCoords
=
dom
.
getDomNodePagePosition
(
domNode
);
const
startCoords
=
this
.
_codeEditor
.
getScrolledVisiblePosition
(
selection
.
getStartPosition
());
const
startLeft
=
editorCoords
.
left
+
(
startCoords
?
startCoords
.
left
:
0
);
const
startTop
=
startCoords
?
startCoords
.
top
:
0
;
if
(
startTop
<
this
.
_viewZone
.
heightInPx
)
{
if
(
selection
.
endLineNumber
>
selection
.
startLineNumber
)
{
adjustEditorScrollTop
=
false
;
}
let
leftOfFindWidget
=
dom
.
getTopLeftOffset
(
this
.
_domNode
).
left
;
if
(
startLeft
>
leftOfFindWidget
)
{
adjustEditorScrollTop
=
false
;
}
let
endCoords
=
this
.
_codeEditor
.
getScrolledVisiblePosition
(
selection
.
getEndPosition
());
let
endLeft
=
editorCoords
.
left
+
endCoords
.
left
;
if
(
endLeft
>
leftOfFindWidget
)
{
adjustEditorScrollTop
=
false
;
const
leftOfFindWidget
=
dom
.
getTopLeftOffset
(
this
.
_domNode
).
left
;
if
(
startLeft
>
leftOfFindWidget
)
{
adjustEditorScrollTop
=
false
;
}
const
endCoords
=
this
.
_codeEditor
.
getScrolledVisiblePosition
(
selection
.
getEndPosition
());
const
endLeft
=
editorCoords
.
left
+
(
endCoords
?
endCoords
.
left
:
0
);
if
(
endLeft
>
leftOfFindWidget
)
{
adjustEditorScrollTop
=
false
;
}
}
}
}
...
...
@@ -609,12 +614,16 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
}
private
_updateSearchScope
():
void
{
if
(
!
this
.
_codeEditor
.
hasModel
())
{
return
;
}
if
(
this
.
_toggleSelectionFind
.
checked
)
{
let
selection
=
this
.
_codeEditor
.
getSelection
();
if
(
selection
.
endColumn
===
1
&&
selection
.
endLineNumber
>
selection
.
startLineNumber
)
{
selection
=
selection
.
setEndPosition
(
selection
.
endLineNumber
-
1
,
this
.
_codeEditor
.
getModel
().
getLineMaxColumn
(
selection
.
endLineNumber
-
1
));
}
le
t
currentMatch
=
this
.
_state
.
currentMatch
;
cons
t
currentMatch
=
this
.
_state
.
currentMatch
;
if
(
selection
.
startLineNumber
!==
selection
.
endLineNumber
)
{
if
(
!
Range
.
equalsRange
(
selection
,
currentMatch
))
{
// Reseed find scope
...
...
@@ -725,7 +734,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
appendCaseSensitiveLabel
:
this
.
_keybindingLabelFor
(
FIND_IDS
.
ToggleCaseSensitiveCommand
),
appendWholeWordsLabel
:
this
.
_keybindingLabelFor
(
FIND_IDS
.
ToggleWholeWordCommand
),
appendRegexLabel
:
this
.
_keybindingLabelFor
(
FIND_IDS
.
ToggleRegexCommand
),
validation
:
(
value
:
string
):
InputBoxMessage
=>
{
validation
:
(
value
:
string
):
InputBoxMessage
|
null
=>
{
if
(
value
.
length
===
0
)
{
return
null
;
}
...
...
@@ -806,15 +815,17 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
title
:
NLS_TOGGLE_SELECTION_FIND_TITLE
+
this
.
_keybindingLabelFor
(
FIND_IDS
.
ToggleSearchScopeCommand
),
onChange
:
()
=>
{
if
(
this
.
_toggleSelectionFind
.
checked
)
{
let
selection
=
this
.
_codeEditor
.
getSelection
();
if
(
selection
.
endColumn
===
1
&&
selection
.
endLineNumber
>
selection
.
startLineNumber
)
{
selection
=
selection
.
setEndPosition
(
selection
.
endLineNumber
-
1
,
this
.
_codeEditor
.
getModel
().
getLineMaxColumn
(
selection
.
endLineNumber
-
1
));
}
if
(
!
selection
.
isEmpty
())
{
this
.
_state
.
change
({
searchScope
:
selection
},
true
);
if
(
this
.
_codeEditor
.
hasModel
())
{
let
selection
=
this
.
_codeEditor
.
getSelection
();
if
(
selection
.
endColumn
===
1
&&
selection
.
endLineNumber
>
selection
.
startLineNumber
)
{
selection
=
selection
.
setEndPosition
(
selection
.
endLineNumber
-
1
,
this
.
_codeEditor
.
getModel
().
getLineMaxColumn
(
selection
.
endLineNumber
-
1
));
}
if
(
!
selection
.
isEmpty
())
{
this
.
_state
.
change
({
searchScope
:
selection
},
true
);
}
}
}
else
{
this
.
_state
.
change
({
searchScope
:
null
},
true
);
this
.
_state
.
change
({
searchScope
:
undefined
},
true
);
}
}
}));
...
...
@@ -824,7 +835,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
label
:
NLS_CLOSE_BTN_LABEL
+
this
.
_keybindingLabelFor
(
FIND_IDS
.
CloseFindWidgetCommand
),
className
:
'
close-fw
'
,
onTrigger
:
()
=>
{
this
.
_state
.
change
({
isRevealed
:
false
,
searchScope
:
null
},
false
);
this
.
_state
.
change
({
isRevealed
:
false
,
searchScope
:
undefined
},
false
);
},
onKeyDown
:
(
e
)
=>
{
if
(
e
.
equals
(
KeyCode
.
Tab
))
{
...
...
@@ -850,7 +861,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
let
replaceInput
=
document
.
createElement
(
'
div
'
);
replaceInput
.
className
=
'
replace-input
'
;
replaceInput
.
style
.
width
=
REPLACE_INPUT_AREA_WIDTH
+
'
px
'
;
this
.
_replaceInputBox
=
this
.
_register
(
new
ContextScopedHistoryInputBox
(
replaceInput
,
null
,
{
this
.
_replaceInputBox
=
this
.
_register
(
new
ContextScopedHistoryInputBox
(
replaceInput
,
void
0
,
{
ariaLabel
:
NLS_REPLACE_INPUT_LABEL
,
placeholder
:
NLS_REPLACE_INPUT_PLACEHOLDER
,
history
:
[]
...
...
@@ -950,8 +961,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
return
;
}
le
t
inputBoxWidth
=
width
-
FIND_ALL_CONTROLS_WIDTH
;
let
maxWidth
=
parseFloat
(
dom
.
getComputedStyle
(
this
.
_domNode
).
maxWidth
)
||
0
;
cons
t
inputBoxWidth
=
width
-
FIND_ALL_CONTROLS_WIDTH
;
const
maxWidth
=
parseFloat
(
dom
.
getComputedStyle
(
this
.
_domNode
).
maxWidth
!
)
||
0
;
if
(
width
>
maxWidth
)
{
return
;
}
...
...
@@ -1119,7 +1130,7 @@ export class SimpleButton extends Widget {
// theming
registerThemingParticipant
((
theme
,
collector
)
=>
{
const
addBackgroundColorRule
=
(
selector
:
string
,
color
:
Color
):
void
=>
{
const
addBackgroundColorRule
=
(
selector
:
string
,
color
:
Color
|
null
):
void
=>
{
if
(
color
)
{
collector
.
addRule
(
`.monaco-editor
${
selector
}
{ background-color:
${
color
}
; }`
);
}
...
...
src/vs/platform/widget/browser/contextScopedHistoryWidget.ts
浏览文件 @
f9775c5f
...
...
@@ -30,7 +30,7 @@ export function createAndBindHistoryNavigationWidgetScopedContextKeyService(cont
export
class
ContextScopedHistoryInputBox
extends
HistoryInputBox
{
constructor
(
container
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
,
options
:
IHistoryInputOptions
,
constructor
(
container
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
|
undefined
,
options
:
IHistoryInputOptions
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
)
{
super
(
container
,
contextViewProvider
,
options
);
...
...
@@ -41,7 +41,7 @@ export class ContextScopedHistoryInputBox extends HistoryInputBox {
export
class
ContextScopedFindInput
extends
FindInput
{
constructor
(
container
:
HTMLElement
,
contextViewProvider
:
IContextViewProvider
,
options
:
IFindInputOptions
,
constructor
(
container
:
HTMLElement
|
null
,
contextViewProvider
:
IContextViewProvider
,
options
:
IFindInputOptions
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
showFindOptions
:
boolean
=
false
)
{
super
(
container
,
contextViewProvider
,
showFindOptions
,
options
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录