Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
159f91c5
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,发现更多精彩内容 >>
提交
159f91c5
编写于
2月 15, 2017
作者:
R
rebornix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update comments and remove unnecessary dirty check
上级
ad559ec9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
34 deletion
+8
-34
src/vs/editor/browser/controller/mouseHandler.ts
src/vs/editor/browser/controller/mouseHandler.ts
+1
-1
src/vs/editor/browser/view/viewController.ts
src/vs/editor/browser/view/viewController.ts
+0
-2
src/vs/editor/contrib/dnd/browser/dndHintWidget.ts
src/vs/editor/contrib/dnd/browser/dndHintWidget.ts
+7
-31
未找到文件。
src/vs/editor/browser/controller/mouseHandler.ts
浏览文件 @
159f91c5
...
...
@@ -463,7 +463,7 @@ class MouseDownOperation extends Disposable {
this
.
_mouseDragThenMoveEventHandler
.
handler
,
()
=>
{
if
(
this
.
_mouseState
.
lastMouseDownEvent
!==
'
drag
'
)
{
// the
last event is mouse down which happens 16ms ago
.
// the
re is no dragging so we need to update the cursor position like a simple mouse down+up
.
this
.
_dispatchMouse
(
position
,
e
.
shiftKey
);
}
else
{
this
.
_viewController
.
emitMouseDrop
({
...
...
src/vs/editor/browser/view/viewController.ts
浏览文件 @
159f91c5
...
...
@@ -129,8 +129,6 @@ export class ViewController implements IViewController {
}
else
{
this
.
createCursor
(
'
mouse
'
,
data
.
position
,
false
);
}
// last cursor range select drag
}
}
}
else
{
...
...
src/vs/editor/contrib/dnd/browser/dndHintWidget.ts
浏览文件 @
159f91c5
...
...
@@ -23,7 +23,6 @@ export class DragTargetHintWidget extends Widget implements editorBrowser.IConte
private
_typicalHalfwidthCharacterWidth
:
number
;
private
readonly
_domNode
:
FastDomNode
;
private
_isVisible
:
boolean
=
false
;
private
_isDirty
:
boolean
=
false
;
protected
get
isVisible
():
boolean
{
return
this
.
_isVisible
;
...
...
@@ -33,27 +32,6 @@ export class DragTargetHintWidget extends Widget implements editorBrowser.IConte
this
.
_isVisible
=
value
;
}
protected
set
cursorStyle
(
value
:
TextEditorCursorStyle
)
{
if
(
this
.
_cursorStyle
!==
value
)
{
this
.
_cursorStyle
=
value
;
this
.
_isDirty
=
true
;
}
}
protected
set
lineHeight
(
value
:
number
)
{
if
(
this
.
_lineHeight
!==
value
)
{
this
.
_lineHeight
=
value
;
this
.
_isDirty
=
true
;
}
}
protected
set
typicalHalfwidthCharacterWidth
(
value
:
TextEditorCursorStyle
)
{
if
(
this
.
_typicalHalfwidthCharacterWidth
!==
value
)
{
this
.
_typicalHalfwidthCharacterWidth
=
value
;
this
.
_isDirty
=
true
;
}
}
constructor
(
editor
:
editorBrowser
.
ICodeEditor
)
{
super
();
this
.
_editor
=
editor
;
...
...
@@ -69,15 +47,15 @@ export class DragTargetHintWidget extends Widget implements editorBrowser.IConte
this
.
_domNode
.
setVisibility
(
'
hidden
'
);
this
.
_editor
.
addContentWidget
(
this
);
this
.
cursorStyle
=
this
.
_editor
.
getConfiguration
().
viewInfo
.
cursorStyle
;
this
.
lineHeight
=
this
.
_editor
.
getConfiguration
().
lineHeight
;
this
.
typicalHalfwidthCharacterWidth
=
this
.
_editor
.
getConfiguration
().
fontInfo
.
typicalHalfwidthCharacterWidth
;
this
.
_
cursorStyle
=
this
.
_editor
.
getConfiguration
().
viewInfo
.
cursorStyle
;
this
.
_
lineHeight
=
this
.
_editor
.
getConfiguration
().
lineHeight
;
this
.
_
typicalHalfwidthCharacterWidth
=
this
.
_editor
.
getConfiguration
().
fontInfo
.
typicalHalfwidthCharacterWidth
;
this
.
_register
(
this
.
_editor
.
onDidChangeConfiguration
((
e
:
IConfigurationChangedEvent
)
=>
{
if
(
e
.
fontInfo
||
e
.
viewInfo
||
e
.
lineHeight
)
{
this
.
typicalHalfwidthCharacterWidth
=
this
.
_editor
.
getConfiguration
().
fontInfo
.
typicalHalfwidthCharacterWidth
;
this
.
lineHeight
=
this
.
_editor
.
getConfiguration
().
lineHeight
;
this
.
cursorStyle
=
this
.
_editor
.
getConfiguration
().
viewInfo
.
cursorStyle
;
this
.
_
typicalHalfwidthCharacterWidth
=
this
.
_editor
.
getConfiguration
().
fontInfo
.
typicalHalfwidthCharacterWidth
;
this
.
_
lineHeight
=
this
.
_editor
.
getConfiguration
().
lineHeight
;
this
.
_
cursorStyle
=
this
.
_editor
.
getConfiguration
().
viewInfo
.
cursorStyle
;
}
}));
...
...
@@ -136,7 +114,7 @@ export class DragTargetHintWidget extends Widget implements editorBrowser.IConte
}
private
renderCursor
()
{
if
(
!
this
.
isVisible
||
!
this
.
_isDirty
)
{
if
(
!
this
.
isVisible
)
{
return
;
}
...
...
@@ -153,7 +131,5 @@ export class DragTargetHintWidget extends Widget implements editorBrowser.IConte
}
else
{
this
.
_domNode
.
setClassName
(
'
cursor secondary
'
);
}
this
.
_isDirty
=
false
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录