Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
05567f71
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
05567f71
编写于
6月 20, 2018
作者:
S
SteVen Batten
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/Microsoft/vscode
上级
27314017
1a9f7c85
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
57 addition
and
55 deletion
+57
-55
extensions/markdown-language-features/package.json
extensions/markdown-language-features/package.json
+2
-2
extensions/markdown-language-features/src/markdownEngine.ts
extensions/markdown-language-features/src/markdownEngine.ts
+1
-1
extensions/markdown-language-features/yarn.lock
extensions/markdown-language-features/yarn.lock
+12
-8
src/vs/editor/contrib/linesOperations/linesOperations.ts
src/vs/editor/contrib/linesOperations/linesOperations.ts
+42
-44
未找到文件。
extensions/markdown-language-features/package.json
浏览文件 @
05567f71
...
...
@@ -292,8 +292,8 @@
"build-preview"
:
"webpack --mode development"
},
"dependencies"
:
{
"highlight.js"
:
"9.
5
.0"
,
"markdown-it"
:
"^8.4.
0
"
,
"highlight.js"
:
"9.
12
.0"
,
"markdown-it"
:
"^8.4.
1
"
,
"markdown-it-named-headers"
:
"0.0.4"
,
"vscode-extension-telemetry"
:
"0.0.17"
,
"vscode-nls"
:
"^3.2.1"
...
...
extensions/markdown-language-features/src/markdownEngine.ts
浏览文件 @
05567f71
...
...
@@ -47,7 +47,7 @@ export class MarkdownEngine {
return
`<div>
${
hljs
.
highlight
(
lang
,
str
,
true
).
value
}
</div>`
;
}
catch
(
error
)
{
}
}
return
`<code><div>
${
this
.
md
!
.
utils
.
escapeHtml
(
str
)}
</div>`
;
return
`<code><div>
${
this
.
md
!
.
utils
.
escapeHtml
(
str
)}
</div>
</code>
`
;
}
}).
use
(
mdnh
,
{
slugify
:
(
header
:
string
)
=>
this
.
slugifier
.
fromHeading
(
header
).
value
...
...
extensions/markdown-language-features/yarn.lock
浏览文件 @
05567f71
...
...
@@ -2544,9 +2544,9 @@ he@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
highlight.js@9.
5
.0:
version "9.
5
.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.
5.0.tgz#46ae51b9db00f70052bcdf196cd404757b6582a
e"
highlight.js@9.
12
.0:
version "9.
12
.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.
12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01
e"
hmac-drbg@^1.0.0:
version "1.0.1"
...
...
@@ -3369,15 +3369,15 @@ markdown-it-named-headers@0.0.4:
dependencies:
string "^3.0.1"
markdown-it@^8.4.
0
:
version "8.4.
0
"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.
0.tgz#e2400881bf171f7018ed1bd9da441dac8af6306d
"
markdown-it@^8.4.
1
:
version "8.4.
1
"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.
1.tgz#206fe59b0e4e1b78a7c73250af9b34a4ad0aaf44
"
dependencies:
argparse "^1.0.7"
entities "~1.1.1"
linkify-it "^2.0.0"
mdurl "^1.0.1"
uc.micro "^1.0.
3
"
uc.micro "^1.0.
5
"
md5.js@^1.3.4:
version "1.3.4"
...
...
@@ -5196,10 +5196,14 @@ typescript@^2.7.2:
version "2.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836"
uc.micro@^1.0.1
, uc.micro@^1.0.3
:
uc.micro@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192"
uc.micro@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376"
uglify-es@^3.3.4:
version "3.3.10"
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.10.tgz#8b0b7992cebe20edc26de1bf325cef797b8f3fa5"
...
...
src/vs/editor/contrib/linesOperations/linesOperations.ts
浏览文件 @
05567f71
...
...
@@ -35,7 +35,7 @@ abstract class AbstractCopyLinesAction extends EditorAction {
this
.
down
=
down
;
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
let
commands
:
ICommand
[]
=
[];
let
selections
=
editor
.
getSelections
();
...
...
@@ -93,7 +93,7 @@ abstract class AbstractMoveLinesAction extends EditorAction {
this
.
down
=
down
;
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
let
commands
:
ICommand
[]
=
[];
let
selections
=
editor
.
getSelections
();
...
...
@@ -149,7 +149,7 @@ export abstract class AbstractSortLinesAction extends EditorAction {
this
.
descending
=
descending
;
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
const
selections
=
editor
.
getSelections
();
for
(
let
i
=
0
,
len
=
selections
.
length
;
i
<
len
;
i
++
)
{
...
...
@@ -209,7 +209,7 @@ export class TrimTrailingWhitespaceAction extends EditorAction {
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
,
args
:
any
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
,
args
:
any
):
void
{
let
cursors
:
Position
[]
=
[];
if
(
args
.
reason
===
'
auto-save
'
)
{
...
...
@@ -235,8 +235,36 @@ interface IDeleteLinesOperation {
positionColumn
:
number
;
}
abstract
class
AbstractRemoveLinesAction
extends
EditorAction
{
_getLinesToRemove
(
editor
:
ICodeEditor
):
IDeleteLinesOperation
[]
{
class
DeleteLinesAction
extends
EditorAction
{
constructor
()
{
super
({
id
:
'
editor.action.deleteLines
'
,
label
:
nls
.
localize
(
'
lines.delete
'
,
"
Delete Line
"
),
alias
:
'
Delete Line
'
,
precondition
:
EditorContextKeys
.
writable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
textInputFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_K
}
});
}
public
run
(
_accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
let
ops
=
this
.
_getLinesToRemove
(
editor
);
// Finally, construct the delete lines commands
let
commands
:
ICommand
[]
=
ops
.
map
((
op
)
=>
{
return
new
DeleteLinesCommand
(
op
.
startLineNumber
,
op
.
endLineNumber
,
op
.
positionColumn
);
});
editor
.
pushUndoStop
();
editor
.
executeCommands
(
this
.
id
,
commands
);
editor
.
pushUndoStop
();
}
private
_getLinesToRemove
(
editor
:
ICodeEditor
):
IDeleteLinesOperation
[]
{
// Construct delete operations
let
operations
:
IDeleteLinesOperation
[]
=
editor
.
getSelections
().
map
((
s
)
=>
{
...
...
@@ -277,36 +305,6 @@ abstract class AbstractRemoveLinesAction extends EditorAction {
}
}
class
DeleteLinesAction
extends
AbstractRemoveLinesAction
{
constructor
()
{
super
({
id
:
'
editor.action.deleteLines
'
,
label
:
nls
.
localize
(
'
lines.delete
'
,
"
Delete Line
"
),
alias
:
'
Delete Line
'
,
precondition
:
EditorContextKeys
.
writable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
textInputFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_K
}
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
let
ops
=
this
.
_getLinesToRemove
(
editor
);
// Finally, construct the delete lines commands
let
commands
:
ICommand
[]
=
ops
.
map
((
op
)
=>
{
return
new
DeleteLinesCommand
(
op
.
startLineNumber
,
op
.
endLineNumber
,
op
.
positionColumn
);
});
editor
.
pushUndoStop
();
editor
.
executeCommands
(
this
.
id
,
commands
);
editor
.
pushUndoStop
();
}
}
export
class
IndentLinesAction
extends
EditorAction
{
constructor
()
{
super
({
...
...
@@ -321,7 +319,7 @@ export class IndentLinesAction extends EditorAction {
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
editor
.
pushUndoStop
();
editor
.
executeCommands
(
this
.
id
,
TypeOperations
.
indent
(
editor
.
_getCursorConfiguration
(),
editor
.
getModel
(),
editor
.
getSelections
()));
editor
.
pushUndoStop
();
...
...
@@ -342,7 +340,7 @@ class OutdentLinesAction extends EditorAction {
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
CoreEditingCommands
.
Outdent
.
runEditorCommand
(
null
,
editor
,
null
);
}
}
...
...
@@ -361,7 +359,7 @@ export class InsertLineBeforeAction extends EditorAction {
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
editor
.
pushUndoStop
();
editor
.
executeCommands
(
this
.
id
,
TypeOperations
.
lineInsertBefore
(
editor
.
_getCursorConfiguration
(),
editor
.
getModel
(),
editor
.
getSelections
()));
}
...
...
@@ -381,14 +379,14 @@ export class InsertLineAfterAction extends EditorAction {
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
editor
.
pushUndoStop
();
editor
.
executeCommands
(
this
.
id
,
TypeOperations
.
lineInsertAfter
(
editor
.
_getCursorConfiguration
(),
editor
.
getModel
(),
editor
.
getSelections
()));
}
}
export
abstract
class
AbstractDeleteAllToBoundaryAction
extends
EditorAction
{
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
const
primaryCursor
=
editor
.
getSelection
();
let
rangesToDelete
=
this
.
_getRangesToDelete
(
editor
);
// merge overlapping selections
...
...
@@ -566,7 +564,7 @@ export class JoinLinesAction extends EditorAction {
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
let
selections
=
editor
.
getSelections
();
let
primaryCursor
=
editor
.
getSelection
();
...
...
@@ -709,7 +707,7 @@ export class TransposeAction extends EditorAction {
});
}
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
let
selections
=
editor
.
getSelections
();
let
model
=
editor
.
getModel
();
let
commands
:
ICommand
[]
=
[];
...
...
@@ -750,7 +748,7 @@ export class TransposeAction extends EditorAction {
}
export
abstract
class
AbstractCaseAction
extends
EditorAction
{
public
run
(
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
public
run
(
_
accessor
:
ServicesAccessor
,
editor
:
ICodeEditor
):
void
{
let
selections
=
editor
.
getSelections
();
let
model
=
editor
.
getModel
();
let
commands
:
ICommand
[]
=
[];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录