Merge pull request #1010 from Tyriar/vscode34466

Add null check when fetching line string
This commit is contained in:
Daniel Imms
2017-09-30 05:37:11 -04:00
committed by GitHub
+3
View File
@@ -211,6 +211,9 @@ export class Buffer implements IBuffer {
let widthAdjustedStartCol = startCol;
let widthAdjustedEndCol = endCol;
const line = this.lines.get(lineIndex);
if (!line) {
return '';
}
for (let i = 0; i < line.length; i++) {
const char = line[i];
lineString += char[CHAR_DATA_CHAR_INDEX];