Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2513c1b0
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,发现更多精彩内容 >>
提交
2513c1b0
编写于
5月 23, 2017
作者:
R
rebornix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #15148. Auto find in selection.
上级
066db6b8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
4 deletion
+33
-4
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+5
-0
src/vs/editor/common/config/editorOptions.ts
src/vs/editor/common/config/editorOptions.ts
+13
-2
src/vs/editor/contrib/find/browser/findWidget.ts
src/vs/editor/contrib/find/browser/findWidget.ts
+7
-2
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+8
-0
未找到文件。
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
2513c1b0
...
...
@@ -262,6 +262,11 @@ const editorConfiguration: IConfigurationNode = {
'
default
'
:
EDITOR_DEFAULTS
.
contribInfo
.
find
.
seedSearchStringFromSelection
,
'
description
'
:
nls
.
localize
(
'
find.seedSearchStringFromSelection
'
,
"
Controls if we seed the search string in Find Widget from editor selection
"
)
},
'
editor.find.autoFindInSelection
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
EDITOR_DEFAULTS
.
contribInfo
.
find
.
autoFindInSelection
,
'
description
'
:
nls
.
localize
(
'
find.autoFindInSelection
'
,
"
Controls if Find in Selection flag is turned on when multiple characters or lines of text are selected in the editor
"
)
},
'
editor.wordWrap
'
:
{
'
type
'
:
'
string
'
,
'
enum
'
:
[
'
off
'
,
'
on
'
,
'
wordWrapColumn
'
,
'
bounded
'
],
...
...
src/vs/editor/common/config/editorOptions.ts
浏览文件 @
2513c1b0
...
...
@@ -78,7 +78,14 @@ export interface IEditorScrollbarOptions {
* Configuration options for editor find widget
*/
export
interface
IEditorFindOptions
{
/**
* Controls if we seed search string in the Find Widget with editor selection.
*/
seedSearchStringFromSelection
?:
boolean
;
/**
* Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor.
*/
autoFindInSelection
:
boolean
;
}
/**
...
...
@@ -685,6 +692,7 @@ export interface InternalEditorMinimapOptions {
export
interface
InternalEditorFindOptions
{
readonly
seedSearchStringFromSelection
:
boolean
;
readonly
autoFindInSelection
:
boolean
;
}
export
interface
EditorWrappingInfo
{
...
...
@@ -1027,6 +1035,7 @@ export class InternalEditorOptions {
private
static
_equalFindOptions
(
a
:
InternalEditorFindOptions
,
b
:
InternalEditorFindOptions
):
boolean
{
return
(
a
.
seedSearchStringFromSelection
===
b
.
seedSearchStringFromSelection
&&
a
.
autoFindInSelection
===
b
.
autoFindInSelection
);
}
...
...
@@ -1446,7 +1455,8 @@ export class EditorOptionsValidator {
}
return
{
seedSearchStringFromSelection
:
_boolean
(
opts
.
seedSearchStringFromSelection
,
defaults
.
seedSearchStringFromSelection
)
seedSearchStringFromSelection
:
_boolean
(
opts
.
seedSearchStringFromSelection
,
defaults
.
seedSearchStringFromSelection
),
autoFindInSelection
:
_boolean
(
opts
.
autoFindInSelection
,
defaults
.
autoFindInSelection
)
};
}
...
...
@@ -1995,7 +2005,8 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
showFoldingControls
:
'
mouseover
'
,
matchBrackets
:
true
,
find
:
{
seedSearchStringFromSelection
:
true
seedSearchStringFromSelection
:
true
,
autoFindInSelection
:
false
}
},
};
src/vs/editor/contrib/find/browser/findWidget.ts
浏览文件 @
2513c1b0
...
...
@@ -246,10 +246,8 @@ export class FindWidget extends Widget implements IOverlayWidget {
}
if
(
e
.
isRevealed
)
{
if
(
this
.
_state
.
isRevealed
)
{
console
.
log
(
'
open find widget
'
);
this
.
_reveal
(
true
);
}
else
{
console
.
log
(
'
close find widget
'
);
this
.
_hide
(
true
);
}
}
...
...
@@ -365,6 +363,13 @@ export class FindWidget extends Widget implements IOverlayWidget {
if
(
!
this
.
_isVisible
)
{
this
.
_isVisible
=
true
;
let
selection
=
this
.
_codeEditor
.
getSelection
();
let
isSelection
=
selection
?
(
selection
.
startLineNumber
!==
selection
.
endLineNumber
||
selection
.
startColumn
!==
selection
.
endColumn
)
:
false
;
if
(
isSelection
&&
this
.
_codeEditor
.
getConfiguration
().
contribInfo
.
find
.
autoFindInSelection
)
{
this
.
_toggleSelectionFind
.
checked
=
true
;
}
else
{
this
.
_toggleSelectionFind
.
checked
=
false
;
}
this
.
_updateButtons
();
setTimeout
(()
=>
{
...
...
src/vs/monaco.d.ts
浏览文件 @
2513c1b0
...
...
@@ -2631,7 +2631,14 @@ declare module monaco.editor {
* Configuration options for editor find widget
*/
export
interface
IEditorFindOptions
{
/**
* Controls if we seed search string in the Find Widget with editor selection.
*/
seedSearchStringFromSelection
?:
boolean
;
/**
* Controls if Find in Selection flag is turned on when multiple characters or lines of text are selected in the editor.
*/
autoFindInSelection
:
boolean
;
}
/**
...
...
@@ -3166,6 +3173,7 @@ declare module monaco.editor {
export
interface
InternalEditorFindOptions
{
readonly
seedSearchStringFromSelection
:
boolean
;
readonly
autoFindInSelection
:
boolean
;
}
export
interface
EditorWrappingInfo
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录