mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-14 20:34:30 +01:00
@@ -54,6 +54,12 @@ export function convertLinkRangeToBuffer(lines: IBufferLine[], bufferWidth: numb
|
||||
const startLineOffset = (y === startWrappedLineCount - 1 ? startOffset : 0);
|
||||
let lineOffset = 0;
|
||||
const line = lines[y];
|
||||
// Sanity check for line, apparently this can happen but it's not clear under what
|
||||
// circumstances this happens. Continue on, skipping the remainder of start offset if this
|
||||
// happens to minimize impact.
|
||||
if (!line) {
|
||||
break;
|
||||
}
|
||||
for (let x = start; x < Math.min(bufferWidth, lineLength + lineOffset + startLineOffset); x++) {
|
||||
const cell = line.getCell(x)!;
|
||||
const width = cell.getWidth();
|
||||
|
||||
Reference in New Issue
Block a user