); for (const viewLineInfo of group.viewLines) { <del> if (viewLineInfo.isWrappedLineContinuation && this.getMinColumnOfViewLine(viewLineInfo) === 1) { // Don't add indent guides when the wrapped line continuation has no wrapping-indentation. resultPerViewLine.push([]); } else { const bracketGuides = bracketGuidesPerModelLine[viewLineInfo.modelLineNumber - modelRangeStartLineNumber]; // visibleColumns stay as they are (this is a bug and needs to be fixed, but it is not a regression) // model-columns must be converted to view-model columns. const result = bracketGuides.map(g => { if (g.forWrappedLinesAfterColumn !== -1) { const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.forWrappedLinesAfterColumn); if (p.lineNumber >= viewLineInfo.modelLineWrappedLineIdx) { return undefined; } } if (g.forWrappedLinesBeforeOrAtColumn !== -1) { const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.forWrappedLinesBeforeOrAtColumn); if (p.lineNumber < viewLineInfo.modelLineWrappedLineIdx) { return undefined; } } </del> <ins> const bracketGuides = bracketGuidesPerModelLine[viewLineInfo.modelLineNumber - modelRangeStartLineNumber]; </ins> <del> if (!g.horizontalLine) { return g; </del> <ins> // visibleColumns stay as they are (this is a bug and needs to be fixed, but it is not a regression) // model-columns must be converted to view-model columns. const result = bracketGuides.map(g => { if (g.forWrappedLinesAfterColumn !== -1) { const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.forWrappedLinesAfterColumn); if (p.lineNumber >= viewLineInfo.modelLineWrappedLineIdx) { return undefined; </ins> } <ins> } </ins> <del> let column = -1; if (g.column !== -1) { const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.column); if (p.lineNumber === viewLineInfo.modelLineWrappedLineIdx) { column = p.column; } else if (p.lineNumber < viewLineInfo.modelLineWrappedLineIdx) { column = this.getMinColumnOfViewLine(viewLineInfo); } else if (p.lineNumber > viewLineInfo.modelLineWrappedLineIdx) { return undefined; } </del> <ins> if (g.forWrappedLinesBeforeOrAtColumn !== -1) { const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.forWrappedLinesBeforeOrAtColumn); if (p.lineNumber < viewLineInfo.modelLineWrappedLineIdx) { return undefined; </ins> } <ins> } if (!g.horizontalLine) { return g; } </ins> <del> const viewPosition = this.convertModelPositionToViewPosition(viewLineInfo.modelLineNumber, g.horizontalLine.endColumn); const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.horizontalLine.endColumn); </del> <ins> let column = -1; if (g.column !== -1) { const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.column); </ins> if (p.lineNumber === viewLineInfo.modelLineWrappedLineIdx) { <del> return new IndentGuide(g.visibleColumn, column, g.className, new IndentGuideHorizontalLine(g.horizontalLine.top, viewPosition.column), - 1, -1, ); </del> <ins> column = p.column; </ins> } else if (p.lineNumber < viewLineInfo.modelLineWrappedLineIdx) { <ins> column = this.getMinColumnOfViewLine(viewLineInfo); } else if (p.lineNumber > viewLineInfo.modelLineWrappedLineIdx) { </ins> return undefined; <del> } else { if (g.visibleColumn !== -1) { // Don't repeat horizontal lines that use visibleColumn for unrelated lines. return undefined; } return new IndentGuide(g.visibleColumn, column, g.className, new IndentGuideHorizontalLine(g.horizontalLine.top, this.getMaxColumnOfViewLine(viewLineInfo) ), -1, -1, ); </del> } <del> }); resultPerViewLine.push(result.filter((r): r is IndentGuide => !!r)); } </del> <ins> } const viewPosition = this.convertModelPositionToViewPosition(viewLineInfo.modelLineNumber, g.horizontalLine.endColumn); const p = this.modelLineProjections[viewLineInfo.modelLineNumber - 1].getViewPositionOfModelPosition(0, g.horizontalLine.endColumn); if (p.lineNumber === viewLineInfo.modelLineWrappedLineIdx) { return new IndentGuide(g.visibleColumn, column, g.className, new IndentGuideHorizontalLine(g.horizontalLine.top, viewPosition.column), - 1, -1, ); } else if (p.lineNumber < viewLineInfo.modelLineWrappedLineIdx) { return undefined; } else { if (g.visibleColumn !== -1) { // Don't repeat horizontal lines that use visibleColumn for unrelated lines. return undefined; } return new IndentGuide(g.visibleColumn, column, g.className, new IndentGuideHorizontalLine(g.horizontalLine.top, this.getMaxColumnOfViewLine(viewLineInfo) ), -1, -1, ); } }); resultPerViewLine.push(result.filter((r): r is IndentGuide => !!r)); </ins> } }