Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
27f45235
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,发现更多精彩内容 >>
提交
27f45235
编写于
8月 08, 2017
作者:
C
cleidigh
提交者:
Peng Lyu
8月 25, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Hide input focus tracker, cleanup
上级
b69d45bb
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
23 addition
and
37 deletion
+23
-37
product.json
product.json
+2
-7
src/vs/editor/contrib/find/browser/simpleFindWidget.ts
src/vs/editor/contrib/find/browser/simpleFindWidget.ts
+10
-4
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
+3
-3
src/vs/workbench/parts/html/browser/webviewEditor.ts
src/vs/workbench/parts/html/browser/webviewEditor.ts
+2
-2
src/vs/workbench/parts/html/browser/webviewFindWidget.ts
src/vs/workbench/parts/html/browser/webviewFindWidget.ts
+2
-10
src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts
.../parts/terminal/electron-browser/terminal.contribution.ts
+2
-2
src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts
...nch/parts/terminal/electron-browser/terminalFindWidget.ts
+0
-7
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
...bench/parts/update/electron-browser/releaseNotesEditor.ts
+2
-2
未找到文件。
product.json
浏览文件 @
27f45235
...
...
@@ -14,10 +14,5 @@
"win32ShellNameShort"
:
"C&ode - OSS"
,
"darwinBundleIdentifier"
:
"com.visualstudio.code.oss"
,
"reportIssueUrl"
:
"https://github.com/Microsoft/vscode/issues/new"
,
"urlProtocol"
:
"code-oss"
,
"extensionsGallery"
:
{
"serviceUrl"
:
"https://marketplace.visualstudio.com/_apis/public/gallery"
,
"cacheUrl"
:
"https://vscode.blob.core.windows.net/gallery/index"
,
"itemUrl"
:
"https://marketplace.visualstudio.com/items"
}
}
"urlProtocol"
:
"code-oss"
}
\ No newline at end of file
src/vs/editor/contrib/find/browser/simpleFindWidget.ts
浏览文件 @
27f45235
...
...
@@ -112,8 +112,8 @@ export abstract class SimpleFindWidget extends Widget {
this
.
_register
(
this
.
_focusTracker
.
addBlurListener
(
this
.
onFocusTrackerBlur
.
bind
(
this
)));
this
.
_findInputFocusTracker
=
this
.
_register
(
dom
.
trackFocus
(
this
.
_findInput
.
domNode
));
this
.
_register
(
this
.
_findInputFocusTracker
.
addFocusListener
(
this
.
onFindInputFocusTrackerFocus
.
bind
(
this
)));
this
.
_register
(
this
.
_findInputFocusTracker
.
addBlurListener
(
this
.
onFindInputFocusTrackerBlur
.
bind
(
this
)));
this
.
_register
(
this
.
_findInputFocusTracker
.
addFocusListener
(
this
.
_
onFindInputFocusTrackerFocus
.
bind
(
this
)));
this
.
_register
(
this
.
_findInputFocusTracker
.
addBlurListener
(
this
.
_
onFindInputFocusTrackerBlur
.
bind
(
this
)));
this
.
_register
(
dom
.
addDisposableListener
(
this
.
_domNode
,
'
click
'
,
(
event
)
=>
{
event
.
stopPropagation
();
...
...
@@ -124,8 +124,14 @@ export abstract class SimpleFindWidget extends Widget {
protected
abstract
find
(
previous
:
boolean
);
protected
abstract
onFocusTrackerFocus
();
protected
abstract
onFocusTrackerBlur
();
protected
abstract
onFindInputFocusTrackerFocus
();
protected
abstract
onFindInputFocusTrackerBlur
();
private
_onFindInputFocusTrackerFocus
()
{
this
.
_findInputFocused
.
set
(
true
);
}
private
_onFindInputFocusTrackerBlur
()
{
this
.
_findInputFocused
.
reset
();
}
protected
get
inputValue
()
{
return
this
.
_findInput
.
getValue
();
...
...
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
浏览文件 @
27f45235
...
...
@@ -53,7 +53,7 @@ import { IContextKeyService, RawContextKey, ContextKeyExpr, IContextKey } from '
import
{
Command
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
default
as
Web
V
iew
,
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_INPUT_FOCUSED
}
from
'
vs/workbench/parts/html/browser/webview
'
;
import
{
default
as
Web
v
iew
,
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_INPUT_FOCUSED
}
from
'
vs/workbench/parts/html/browser/webview
'
;
/** A context key that is set when an extension editor webview has focus. */
export
const
KEYBINDING_CONTEXT_EXTENSIONEDITOR_WEBVIEW_FOCUS
=
new
RawContextKey
<
boolean
>
(
'
extensionEditorWebviewFocus
'
,
undefined
);
...
...
@@ -173,7 +173,7 @@ export class ExtensionEditor extends BaseEditor {
private
contentDisposables
:
IDisposable
[]
=
[];
private
transientDisposables
:
IDisposable
[]
=
[];
private
disposables
:
IDisposable
[];
private
activeWebview
:
Web
V
iew
;
private
activeWebview
:
Web
v
iew
;
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
...
...
@@ -391,7 +391,7 @@ export class ExtensionEditor extends BaseEditor {
.
then
<
void
>
(
body
=>
{
const
allowedBadgeProviders
=
this
.
extensionsWorkbenchService
.
allowedBadgeProviders
;
const
webViewOptions
=
allowedBadgeProviders
.
length
>
0
?
{
allowScripts
:
false
,
allowSvgs
:
false
,
svgWhiteList
:
allowedBadgeProviders
}
:
undefined
;
this
.
activeWebview
=
new
Web
V
iew
(
this
.
content
,
this
.
partService
.
getContainer
(
Parts
.
EDITOR_PART
),
this
.
contextViewService
,
this
.
contextKeyService
,
this
.
contextKey
,
webViewOptions
);
this
.
activeWebview
=
new
Web
v
iew
(
this
.
content
,
this
.
partService
.
getContainer
(
Parts
.
EDITOR_PART
),
this
.
contextViewService
,
this
.
contextKeyService
,
this
.
contextKey
,
webViewOptions
);
const
removeLayoutParticipant
=
arrays
.
insert
(
this
.
layoutParticipants
,
this
.
activeWebview
);
this
.
contentDisposables
.
push
(
toDisposable
(
removeLayoutParticipant
));
...
...
src/vs/workbench/parts/html/browser/webviewEditor.ts
浏览文件 @
27f45235
...
...
@@ -14,7 +14,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi
import
{
KeyMod
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
ContextKeyExpr
,
IContextKey
,
RawContextKey
,
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
default
as
Web
V
iew
,
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_INPUT_FOCUSED
}
from
'
./webview
'
;
import
{
default
as
Web
v
iew
,
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_INPUT_FOCUSED
}
from
'
./webview
'
;
import
{
Builder
}
from
'
vs/base/browser/builder
'
;
export
interface
HtmlPreviewEditorViewState
{
...
...
@@ -32,7 +32,7 @@ export const KEYBINDING_CONTEXT_WEBVIEWEDITOR_NOT_FOCUSED: ContextKeyExpr = KEYB
export
abstract
class
WebviewEditor
extends
BaseWebviewEditor
{
protected
_webviewFocusContextKey
:
IContextKey
<
boolean
>
;
protected
_webview
:
Web
V
iew
;
protected
_webview
:
Web
v
iew
;
protected
content
:
HTMLElement
;
protected
contextKey
:
IContextKey
<
boolean
>
;
...
...
src/vs/workbench/parts/html/browser/webviewFindWidget.ts
浏览文件 @
27f45235
...
...
@@ -6,20 +6,19 @@
import
{
SimpleFindWidget
}
from
'
vs/editor/contrib/find/browser/simpleFindWidget
'
;
import
{
IContextViewService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IContextKeyService
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
Web
V
iew
from
'
./webview
'
;
import
Web
v
iew
from
'
./webview
'
;
export
class
WebviewFindWidget
extends
SimpleFindWidget
{
constructor
(
@
IContextViewService
_contextViewService
:
IContextViewService
,
@
IContextKeyService
private
_contextKeyService
:
IContextKeyService
,
private
webview
:
Web
V
iew
,
private
webview
:
Web
v
iew
,
private
_findInputContextKey
:
RawContextKey
<
boolean
>
)
{
super
(
_contextViewService
);
this
.
_findInputFocused
=
_findInputContextKey
.
bindTo
(
this
.
_contextKeyService
);
console
.
debug
(
this
.
_findInputContextKey
.
keys
());
this
.
find
=
this
.
find
.
bind
(
this
);
this
.
hide
=
this
.
hide
.
bind
(
this
);
this
.
onInputChanged
=
this
.
onInputChanged
.
bind
(
this
);
...
...
@@ -59,11 +58,4 @@ export class WebviewFindWidget extends SimpleFindWidget {
this
.
webview
.
notifyFindWidgetFocusChanged
(
false
);
}
protected
onFindInputFocusTrackerFocus
()
{
this
.
_findInputFocused
.
set
(
true
);
}
protected
onFindInputFocusTrackerBlur
()
{
this
.
_findInputFocused
.
reset
();
}
}
\ No newline at end of file
src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts
浏览文件 @
27f45235
...
...
@@ -355,11 +355,11 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowPreviousFind
actionRegistry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
NextMatchTerminalFindWidgetAction
,
NextMatchTerminalFindWidgetAction
.
ID
,
NextMatchTerminalFindWidgetAction
.
LABEL
,
{
primary
:
KeyCode
.
F3
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_G
,
secondary
:
[
KeyCode
.
F3
]
}
},
KEYBINDING_CONTEXT_TERMINAL_FOCUS
),
'
Terminal:
Find Next
'
,
category
);
},
KEYBINDING_CONTEXT_TERMINAL_FOCUS
),
'
Find Next
'
,
category
);
actionRegistry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
PreviousMatchTerminalFindWidgetAction
,
PreviousMatchTerminalFindWidgetAction
.
ID
,
PreviousMatchTerminalFindWidgetAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
F3
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_G
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
F3
]
}
},
KEYBINDING_CONTEXT_TERMINAL_FOCUS
),
'
Terminal:
Find Previous
'
,
category
);
},
KEYBINDING_CONTEXT_TERMINAL_FOCUS
),
'
Find Previous
'
,
category
);
actionRegistry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
DeleteWordLeftTerminalAction
,
DeleteWordLeftTerminalAction
.
ID
,
DeleteWordLeftTerminalAction
.
LABEL
,
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Backspace
,
...
...
src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts
浏览文件 @
27f45235
...
...
@@ -48,11 +48,4 @@ export class TerminalFindWidget extends SimpleFindWidget {
this
.
_terminalService
.
getActiveInstance
().
notifyFindWidgetFocusChanged
(
false
);
}
protected
onFindInputFocusTrackerFocus
()
{
this
.
_findInputFocused
.
set
(
true
);
}
protected
onFindInputFocusTrackerBlur
()
{
this
.
_findInputFocused
.
reset
();
}
}
\ No newline at end of file
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
浏览文件 @
27f45235
...
...
@@ -14,7 +14,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
ReleaseNotesInput
}
from
'
./releaseNotesInput
'
;
import
{
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
Web
V
iew
from
'
vs/workbench/parts/html/browser/webview
'
;
import
Web
v
iew
from
'
vs/workbench/parts/html/browser/webview
'
;
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
tokenizeToString
}
from
'
vs/editor/common/modes/textToHtmlTokenizer
'
;
...
...
@@ -95,7 +95,7 @@ export class ReleaseNotesEditor extends WebviewEditor {
})
.
then
(
renderBody
)
.
then
<
void
>
(
body
=>
{
this
.
_webview
=
new
Web
V
iew
(
this
.
content
,
this
.
partService
.
getContainer
(
Parts
.
EDITOR_PART
),
this
.
_contextViewService
,
this
.
_contextKeyService
,
this
.
contextKey
);
this
.
_webview
=
new
Web
v
iew
(
this
.
content
,
this
.
partService
.
getContainer
(
Parts
.
EDITOR_PART
),
this
.
_contextViewService
,
this
.
_contextKeyService
,
this
.
contextKey
);
if
(
this
.
input
&&
this
.
input
instanceof
ReleaseNotesInput
)
{
const
state
=
this
.
loadViewState
(
this
.
input
.
version
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录