Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f5aa82d2
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,体验更适合开发者的 AI 搜索 >>
提交
f5aa82d2
编写于
2月 20, 2017
作者:
R
rebornix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
put drag and drop behind an option and turn it off by default
上级
381d8bfc
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
1 deletion
+28
-1
src/vs/editor/browser/controller/mouseHandler.ts
src/vs/editor/browser/controller/mouseHandler.ts
+2
-1
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+6
-0
src/vs/editor/common/config/defaultConfig.ts
src/vs/editor/common/config/defaultConfig.ts
+1
-0
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+11
-0
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+7
-0
src/vs/platform/telemetry/common/telemetryUtils.ts
src/vs/platform/telemetry/common/telemetryUtils.ts
+1
-0
未找到文件。
src/vs/editor/browser/controller/mouseHandler.ts
浏览文件 @
f5aa82d2
...
...
@@ -429,7 +429,8 @@ class MouseDownOperation extends Disposable {
// Overwrite the detail of the MouseEvent, as it will be sent out in an event and contributions might rely on it.
e
.
detail
=
this
.
_mouseState
.
count
;
if
(
!
this
.
_mouseState
.
altKey
// we don't support multiple mouse
if
(
this
.
_context
.
configuration
.
editor
.
enableDragAndDrop
&&
!
this
.
_mouseState
.
altKey
// we don't support multiple mouse
&&
e
.
detail
<
2
// only single click on a selection can work
&&
!
this
.
_isActive
// the mouse is not down yet
&&
!
this
.
_currentSelection
.
isEmpty
()
// we don't drag single cursor
...
...
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
f5aa82d2
...
...
@@ -317,6 +317,7 @@ class InternalEditorOptionsHelper {
autoClosingBrackets
:
toBoolean
(
opts
.
autoClosingBrackets
),
useTabStops
:
toBoolean
(
opts
.
useTabStops
),
tabFocusMode
:
tabFocusMode
,
enableDragAndDrop
:
toBoolean
(
opts
.
enableDragAndDrop
),
layoutInfo
:
layoutInfo
,
fontInfo
:
fontInfo
,
viewInfo
:
viewInfo
,
...
...
@@ -842,6 +843,11 @@ const editorConfiguration: IConfigurationNode = {
'
default
'
:
false
,
'
description
'
:
nls
.
localize
(
'
stablePeek
'
,
"
Keep peek editors open even when double clicking their content or when hitting Escape.
"
)
},
'
editor.enableDragAndDrop
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
DefaultConfig
.
editor
.
enableDragAndDrop
,
'
description
'
:
nls
.
localize
(
'
enableDragAndDrop
'
,
"
Controls if the editor should allow to move selections via drag and drop.
"
)
},
'
diffEditor.renderSideBySide
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
true
,
...
...
src/vs/editor/common/config/defaultConfig.ts
浏览文件 @
f5aa82d2
...
...
@@ -106,6 +106,7 @@ class ConfigClass implements IConfiguration {
renderLineHighlight
:
'
line
'
,
useTabStops
:
true
,
matchBrackets
:
true
,
enableDragAndDrop
:
false
,
fontFamily
:
(
platform
.
isMacintosh
?
DEFAULT_MAC_FONT_FAMILY
:
(
platform
.
isLinux
?
DEFAULT_LINUX_FONT_FAMILY
:
DEFAULT_WINDOWS_FONT_FAMILY
)
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
f5aa82d2
...
...
@@ -419,6 +419,11 @@ export interface IEditorOptions {
* Defaults to false.
*/
formatOnPaste
?:
boolean
;
/**
* Controls if the editor should allow to move selections via drag and drop.
* Defaults to false.
*/
enableDragAndDrop
?:
boolean
;
/**
* Enable the suggestion box to pop-up on trigger characters.
* Defaults to true.
...
...
@@ -1068,6 +1073,7 @@ export class InternalEditorOptions {
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
readonly
tabFocusMode
:
boolean
;
readonly
enableDragAndDrop
:
boolean
;
// ---- grouped options
readonly
layoutInfo
:
EditorLayoutInfo
;
readonly
fontInfo
:
FontInfo
;
...
...
@@ -1085,6 +1091,7 @@ export class InternalEditorOptions {
autoClosingBrackets
:
boolean
;
useTabStops
:
boolean
;
tabFocusMode
:
boolean
;
enableDragAndDrop
:
boolean
;
layoutInfo
:
EditorLayoutInfo
;
fontInfo
:
FontInfo
;
viewInfo
:
InternalEditorViewOptions
;
...
...
@@ -1097,6 +1104,7 @@ export class InternalEditorOptions {
this
.
autoClosingBrackets
=
Boolean
(
source
.
autoClosingBrackets
);
this
.
useTabStops
=
Boolean
(
source
.
useTabStops
);
this
.
tabFocusMode
=
Boolean
(
source
.
tabFocusMode
);
this
.
enableDragAndDrop
=
Boolean
(
source
.
enableDragAndDrop
);
this
.
layoutInfo
=
source
.
layoutInfo
.
clone
();
this
.
fontInfo
=
source
.
fontInfo
.
clone
();
this
.
viewInfo
=
source
.
viewInfo
.
clone
();
...
...
@@ -1115,6 +1123,7 @@ export class InternalEditorOptions {
&&
this
.
autoClosingBrackets
===
other
.
autoClosingBrackets
&&
this
.
useTabStops
===
other
.
useTabStops
&&
this
.
tabFocusMode
===
other
.
tabFocusMode
&&
this
.
enableDragAndDrop
===
other
.
enableDragAndDrop
&&
this
.
layoutInfo
.
equals
(
other
.
layoutInfo
)
&&
this
.
fontInfo
.
equals
(
other
.
fontInfo
)
&&
this
.
viewInfo
.
equals
(
other
.
viewInfo
)
...
...
@@ -1134,6 +1143,7 @@ export class InternalEditorOptions {
autoClosingBrackets
:
(
this
.
autoClosingBrackets
!==
newOpts
.
autoClosingBrackets
),
useTabStops
:
(
this
.
useTabStops
!==
newOpts
.
useTabStops
),
tabFocusMode
:
(
this
.
tabFocusMode
!==
newOpts
.
tabFocusMode
),
enableDragAndDrop
:
(
this
.
enableDragAndDrop
!==
newOpts
.
enableDragAndDrop
),
layoutInfo
:
(
!
this
.
layoutInfo
.
equals
(
newOpts
.
layoutInfo
)),
fontInfo
:
(
!
this
.
fontInfo
.
equals
(
newOpts
.
fontInfo
)),
viewInfo
:
this
.
viewInfo
.
createChangeEvent
(
newOpts
.
viewInfo
),
...
...
@@ -1160,6 +1170,7 @@ export interface IConfigurationChangedEvent {
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
readonly
tabFocusMode
:
boolean
;
readonly
enableDragAndDrop
:
boolean
;
readonly
layoutInfo
:
boolean
;
readonly
fontInfo
:
boolean
;
readonly
viewInfo
:
IViewConfigurationChangedEvent
;
...
...
src/vs/monaco.d.ts
浏览文件 @
f5aa82d2
...
...
@@ -1340,6 +1340,11 @@ declare module monaco.editor {
* Defaults to false.
*/
formatOnPaste
?:
boolean
;
/**
* Controls if the editor should allow to move selections via drag and drop.
* Defaults to false.
*/
enableDragAndDrop
?:
boolean
;
/**
* Enable the suggestion box to pop-up on trigger characters.
* Defaults to true.
...
...
@@ -1599,6 +1604,7 @@ declare module monaco.editor {
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
readonly
tabFocusMode
:
boolean
;
readonly
enableDragAndDrop
:
boolean
;
readonly
layoutInfo
:
EditorLayoutInfo
;
readonly
fontInfo
:
FontInfo
;
readonly
viewInfo
:
InternalEditorViewOptions
;
...
...
@@ -1616,6 +1622,7 @@ declare module monaco.editor {
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
readonly
tabFocusMode
:
boolean
;
readonly
enableDragAndDrop
:
boolean
;
readonly
layoutInfo
:
boolean
;
readonly
fontInfo
:
boolean
;
readonly
viewInfo
:
IViewConfigurationChangedEvent
;
...
...
src/vs/platform/telemetry/common/telemetryUtils.ts
浏览文件 @
f5aa82d2
...
...
@@ -213,6 +213,7 @@ const configurationValueWhitelist = [
'
editor.formatOnType
'
,
'
editor.formatOnSave
'
,
'
editor.formatOnPaste
'
,
'
editor.enableDragAndDrop
'
,
'
window.openFilesInNewWindow
'
,
'
javascript.validate.enable
'
,
'
editor.mouseWheelZoom
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录