提交 50f03d20 编写于 作者: M meganrogge

restructure block range code

上级 9a0a8dc5
......@@ -74,12 +74,11 @@ export default class MarkdownSmartSelect implements vscode.SelectionRangeProvide
let currentRange: vscode.SelectionRange | undefined;
for (const token of sortedTokens) {
currentRange = createBlockRange(token, document);
if (parentRange && currentRange && parentRange.range.contains(currentRange.range)) {
currentRange = createBlockRange(token, document, parentRange);
}
currentRange = createBlockRange(token, document, parentRange);
if (currentRange && currentRange.parent) {
parentRange = createBlockRange(token, document, currentRange.parent);
} else if (currentRange) {
parentRange = currentRange;
}
}
if (!currentRange && parentRange) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册