Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
003521e7
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,发现更多精彩内容 >>
提交
003521e7
编写于
2月 14, 2019
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix markdown preview restoring to wrong position on restart
上级
714192fd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
17 deletion
+24
-17
extensions/markdown-language-features/media/index.js
extensions/markdown-language-features/media/index.js
+11
-7
extensions/markdown-language-features/media/pre.js
extensions/markdown-language-features/media/pre.js
+1
-1
extensions/markdown-language-features/preview-src/events.ts
extensions/markdown-language-features/preview-src/events.ts
+1
-1
extensions/markdown-language-features/preview-src/index.ts
extensions/markdown-language-features/preview-src/index.ts
+3
-1
extensions/markdown-language-features/preview-src/scroll-sync.ts
...ons/markdown-language-features/preview-src/scroll-sync.ts
+7
-7
extensions/markdown-language-features/preview-src/tsconfig.json
...ions/markdown-language-features/preview-src/tsconfig.json
+1
-0
未找到文件。
extensions/markdown-language-features/media/index.js
浏览文件 @
003521e7
...
...
@@ -643,12 +643,12 @@ const messaging_1 = __webpack_require__(/*! ./messaging */ "./preview-src/messag
const
scroll_sync_1
=
__webpack_require__
(
/*! ./scroll-sync */
"
./preview-src/scroll-sync.ts
"
);
const
settings_1
=
__webpack_require__
(
/*! ./settings */
"
./preview-src/settings.ts
"
);
const
throttle
=
__webpack_require__
(
/*! lodash.throttle */
"
./node_modules/lodash.throttle/index.js
"
);
var
scrollDisabled
=
true
;
let
scrollDisabled
=
true
;
const
marker
=
new
activeLineMarker_1
.
ActiveLineMarker
();
const
settings
=
settings_1
.
getSettings
();
const
vscode
=
acquireVsCodeApi
();
// Set VS Code state
cons
t
state
=
settings_1
.
getData
(
'
data-state
'
);
le
t
state
=
settings_1
.
getData
(
'
data-state
'
);
vscode
.
setState
(
state
);
const
messaging
=
messaging_1
.
createPosterForVsCode
(
vscode
);
window
.
cspAlerter
.
setPoster
(
messaging
);
...
...
@@ -762,6 +762,8 @@ if (settings.scrollEditorWithPreview) {
const
line
=
scroll_sync_1
.
getEditorLineNumberForPageOffset
(
window
.
scrollY
);
if
(
typeof
line
===
'
number
'
&&
!
isNaN
(
line
))
{
messaging
.
postMessage
(
'
revealLine
'
,
{
line
});
state
.
line
=
line
;
vscode
.
setState
(
state
);
}
}
},
50
));
...
...
@@ -825,11 +827,13 @@ const getCodeLineElements = (() => {
let
elements
;
return
()
=>
{
if
(
!
elements
)
{
elements
=
([{
element
:
document
.
body
,
line
:
0
}]).
concat
(
Array
.
prototype
.
map
.
call
(
document
.
getElementsByClassName
(
'
code-line
'
),
(
element
)
=>
{
elements
=
[{
element
:
document
.
body
,
line
:
0
}];
for
(
const
element
of
document
.
getElementsByClassName
(
'
code-line
'
))
{
const
line
=
+
element
.
getAttribute
(
'
data-line
'
);
return
{
element
,
line
};
})
.
filter
((
x
)
=>
!
isNaN
(
x
.
line
)));
if
(
!
isNaN
(
line
))
{
elements
.
push
({
element
:
element
,
line
});
}
}
}
return
elements
;
};
...
...
@@ -979,4 +983,4 @@ exports.getSettings = getSettings;
/***/
})
/******/
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwY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x0aWYgKGVsZW1lbnQpIHtcblx0XHRjb25zdCBkYXRhID0gZWxlbWVudC5nZXRBdHRyaWJ1dGUoa2V5KTtcblx0XHRpZiAoZGF0YSkge1xuXHRcdFx0cmV0dXJuIEpTT04ucGFyc2UoZGF0YSk7XG5cdFx0fVxuXHR9XG5cblx0dGhyb3cgbmV3IEVycm9yKGBDb3VsZCBub3QgbG9hZCBkYXRhIGZvciAke2tleX1gKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldFNldHRpbmdzKCk6IFByZXZpZXdTZXR0aW5ncyB7XG5cdGlmIChjYWNoZWRTZXR0aW5ncykge1xuXHRcdHJldHVybiBjYWNoZWRTZXR0aW5ncztcblx0fVxuXG5cdGNhY2hlZFNldHRpbmdzID0gZ2V0RGF0YSgnZGF0YS1zZXR0aW5ncycpO1xuXHRpZiAoY2FjaGVkU2V0dGluZ3MpIHtcblx0XHRyZXR1cm4gY2FjaGVkU2V0dGluZ3M7XG5cdH1cblxuXHR0aHJvdyBuZXcgRXJyb3IoJ0NvdWxkIG5vdCBsb2FkIHNldHRpbmdzJyk7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9
\ No newline at end of file
extensions/markdown-language-features/media/pre.js
浏览文件 @
003521e7
...
...
@@ -277,4 +277,4 @@ exports.getStrings = getStrings;
/***/
})
/******/
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vcHJldmlldy1zcmMvY3NwLnRzIiwid2VicGFjazovLy8uL3ByZXZpZXctc3JjL2xvYWRpbmcudHMiLCJ3ZWJwYWNrOi8vLy4vcHJldmlldy1zcmMvcHJlLnRzIiwid2VicGFjazovLy8uL3ByZXZpZXctc3JjL3NldHRpbmdzLnRzIiwid2VicGFjazovLy8uL3ByZXZpZXctc3JjL3N0cmluZ3MudHMiXSwibmFtZXMiOltdL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tLS0tLS0tLS0tLS0tLS0tXG4gKiAgQ29weXJpZ2h0IChjKSBNaWNyb3NvZnQgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVzZXJ2ZWQuXG4gKiAgTGljZW5zZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlLiBTZWUgTGljZW5zZS50eHQgaW4gdGhlIHByb2plY3Qgcm9vdCBmb3IgbGljZW5zZSBpbmZvcm1hdGlvbi5cbiAqLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qL1xuXG5leHBvcnQgZnVuY3Rpb24gZ2V0U3RyaW5ncygpOiB7IFtrZXk6IHN0cmluZ106IHN0cmluZyB9IHtcblx0Y29uc3Qgc3RvcmUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndnNjb2RlLW1hcmtkb3duLXByZXZpZXctZGF0YScpO1xuXHRpZiAoc3RvcmUpIHtcblx0XHRjb25zdCBkYXRhID0gc3RvcmUuZ2V0QXR0cmlidXRlKCdkYXRhLXN0cmluZ3MnKTtcblx0XHRpZiAoZGF0YSkge1xuXHRcdFx0cmV0dXJuIEpTT04ucGFyc2UoZGF0YSk7XG5cdFx0fVxuXHR9XG5cdHRocm93IG5ldyBFcnJvcignQ291bGQgbm90IGxvYWQgc3RyaW5ncycpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==
\ No newline at end of file
extensions/markdown-language-features/preview-src/events.ts
浏览文件 @
003521e7
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
export
function
onceDocumentLoaded
(
f
:
()
=>
void
)
{
if
(
document
.
readyState
===
'
loading
'
||
document
.
readyState
===
'
uninitialized
'
)
{
if
(
document
.
readyState
===
'
loading
'
||
document
.
readyState
as
string
===
'
uninitialized
'
)
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
f
);
}
else
{
f
();
...
...
extensions/markdown-language-features/preview-src/index.ts
浏览文件 @
003521e7
...
...
@@ -19,7 +19,7 @@ const settings = getSettings();
const
vscode
=
acquireVsCodeApi
();
// Set VS Code state
cons
t
state
=
getData
(
'
data-state
'
);
le
t
state
=
getData
(
'
data-state
'
);
vscode
.
setState
(
state
);
const
messaging
=
createPosterForVsCode
(
vscode
);
...
...
@@ -152,6 +152,8 @@ if (settings.scrollEditorWithPreview) {
const
line
=
getEditorLineNumberForPageOffset
(
window
.
scrollY
);
if
(
typeof
line
===
'
number
'
&&
!
isNaN
(
line
))
{
messaging
.
postMessage
(
'
revealLine
'
,
{
line
});
state
.
line
=
line
;
vscode
.
setState
(
state
);
}
}
},
50
));
...
...
extensions/markdown-language-features/preview-src/scroll-sync.ts
浏览文件 @
003521e7
...
...
@@ -24,13 +24,13 @@ const getCodeLineElements = (() => {
let
elements
:
CodeLineElement
[];
return
()
=>
{
if
(
!
elements
)
{
elements
=
([{
element
:
document
.
body
,
line
:
0
}]).
concat
(
Array
.
prototype
.
map
.
call
(
document
.
getElementsByClassName
(
'
code-line
'
),
(
element
:
any
)
=>
{
const
line
=
+
element
.
getAttribute
(
'
data-line
'
);
return
{
element
,
line
}
;
}
)
.
filter
((
x
:
any
)
=>
!
isNaN
(
x
.
line
)));
elements
=
[{
element
:
document
.
body
,
line
:
0
}];
for
(
const
element
of
document
.
getElementsByClassName
(
'
code-line
'
))
{
const
line
=
+
element
.
getAttribute
(
'
data-line
'
)
!
;
if
(
!
isNaN
(
line
))
{
elements
.
push
({
element
:
element
as
HTMLElement
,
line
})
;
}
}
}
return
elements
;
};
...
...
extensions/markdown-language-features/preview-src/tsconfig.json
浏览文件 @
003521e7
...
...
@@ -6,6 +6,7 @@
"jsx"
:
"react"
,
"sourceMap"
:
true
,
"strict"
:
true
,
"strictBindCallApply"
:
true
,
"noImplicitAny"
:
true
,
"noUnusedLocals"
:
true
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录