提交 6733e4ce 编写于 作者: A Alex Dima

Fixes #26662: More work arounds for `showIfCollapsed` decorations

上级 030453f8
......@@ -153,14 +153,18 @@ export class DecorationsOverlay extends DynamicViewOverlay {
}
const className = d.source.options.className;
const showIfCollapsed = d.source.options.showIfCollapsed;
let range = d.range;
if (showIfCollapsed && range.endColumn === 1 && range.endLineNumber !== range.startLineNumber) {
range = new Range(range.startLineNumber, range.startColumn, range.endLineNumber - 1, this._context.model.getLineMaxColumn(range.endLineNumber - 1));
}
let linesVisibleRanges = ctx.linesVisibleRangesForRange(d.range, /*TODO@Alex*/className === 'findMatch');
let linesVisibleRanges = ctx.linesVisibleRangesForRange(range, /*TODO@Alex*/className === 'findMatch');
if (!linesVisibleRanges) {
continue;
}
const showIfCollapsed = d.source.options.showIfCollapsed;
for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) {
let lineVisibleRanges = linesVisibleRanges[j];
const lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册