Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b850405a
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,发现更多精彩内容 >>
未验证
提交
b850405a
编写于
7月 17, 2019
作者:
M
Matt Bierner
提交者:
GitHub
7月 17, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #76647 from masliu/master
Save resourceColumn for previews, fixes #74008
上级
326c26b9
173d010b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
3 deletion
+20
-3
extensions/markdown-language-features/src/commands/showSource.ts
...ons/markdown-language-features/src/commands/showSource.ts
+5
-3
extensions/markdown-language-features/src/features/preview.ts
...nsions/markdown-language-features/src/features/preview.ts
+10
-0
extensions/markdown-language-features/src/features/previewManager.ts
...markdown-language-features/src/features/previewManager.ts
+5
-0
未找到文件。
extensions/markdown-language-features/src/commands/showSource.ts
浏览文件 @
b850405a
...
...
@@ -15,9 +15,11 @@ export class ShowSourceCommand implements Command {
)
{
}
public
execute
()
{
if
(
this
.
previewManager
.
activePreviewResource
)
{
return
vscode
.
workspace
.
openTextDocument
(
this
.
previewManager
.
activePreviewResource
)
.
then
(
document
=>
vscode
.
window
.
showTextDocument
(
document
));
const
{
activePreviewResource
,
activePreviewResourceColumn
}
=
this
.
previewManager
;
if
(
activePreviewResource
&&
activePreviewResourceColumn
)
{
return
vscode
.
workspace
.
openTextDocument
(
activePreviewResource
).
then
(
document
=>
{
vscode
.
window
.
showTextDocument
(
document
,
activePreviewResourceColumn
);
});
}
return
undefined
;
}
...
...
extensions/markdown-language-features/src/features/preview.ts
浏览文件 @
b850405a
...
...
@@ -102,11 +102,13 @@ export class MarkdownPreview extends Disposable {
const
resource
=
vscode
.
Uri
.
parse
(
state
.
resource
);
const
locked
=
state
.
locked
;
const
line
=
state
.
line
;
const
resourceColumn
=
state
.
resourceColumn
;
const
preview
=
new
MarkdownPreview
(
webview
,
resource
,
locked
,
resourceColumn
,
contentProvider
,
previewConfigurations
,
logger
,
...
...
@@ -125,6 +127,7 @@ export class MarkdownPreview extends Disposable {
public
static
create
(
resource
:
vscode
.
Uri
,
previewColumn
:
vscode
.
ViewColumn
,
resourceColumn
:
vscode
.
ViewColumn
,
locked
:
boolean
,
contentProvider
:
MarkdownContentProvider
,
previewConfigurations
:
MarkdownPreviewConfigurationManager
,
...
...
@@ -144,6 +147,7 @@ export class MarkdownPreview extends Disposable {
webview
,
resource
,
locked
,
resourceColumn
,
contentProvider
,
previewConfigurations
,
logger
,
...
...
@@ -155,6 +159,7 @@ export class MarkdownPreview extends Disposable {
webview
:
vscode
.
WebviewPanel
,
resource
:
vscode
.
Uri
,
locked
:
boolean
,
private
readonly
_resourceColumn
:
vscode
.
ViewColumn
,
private
readonly
_contentProvider
:
MarkdownContentProvider
,
private
readonly
_previewConfigurations
:
MarkdownPreviewConfigurationManager
,
private
readonly
_logger
:
Logger
,
...
...
@@ -249,11 +254,16 @@ export class MarkdownPreview extends Disposable {
return
this
.
_resource
;
}
public
get
resourceColumn
():
vscode
.
ViewColumn
{
return
this
.
_resourceColumn
;
}
public
get
state
()
{
return
{
resource
:
this
.
resource
.
toString
(),
locked
:
this
.
_locked
,
line
:
this
.
line
,
resourceColumn
:
this
.
resourceColumn
,
imageInfo
:
this
.
imageInfo
};
}
...
...
extensions/markdown-language-features/src/features/previewManager.ts
浏览文件 @
b850405a
...
...
@@ -65,6 +65,10 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
return
this
.
_activePreview
&&
this
.
_activePreview
.
resource
;
}
public
get
activePreviewResourceColumn
()
{
return
this
.
_activePreview
&&
this
.
_activePreview
.
resourceColumn
;
}
public
toggleLock
()
{
const
preview
=
this
.
_activePreview
;
if
(
preview
)
{
...
...
@@ -110,6 +114,7 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
const
preview
=
MarkdownPreview
.
create
(
resource
,
previewSettings
.
previewColumn
,
previewSettings
.
resourceColumn
,
previewSettings
.
locked
,
this
.
_contentProvider
,
this
.
_previewConfigurations
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录