Merge pull request #2131 from Tyriar/72149_npe

Fix NPE in reflow
This commit is contained in:
Daniel Imms
2019-05-25 21:23:19 -07:00
committed by GitHub
+1 -1
View File
@@ -294,7 +294,7 @@ export class Buffer implements IBuffer {
for (let y = this.lines.length - 1; y >= 0; y--) {
// Check whether this line is a problem
let nextLine = this.lines.get(y) as BufferLine;
if (!nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {
if (!nextLine || !nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {
continue;
}