Fix translateBufferToString bug

This commit is contained in:
npezza93
2018-01-27 22:06:31 -05:00
parent 833d814499
commit dc59f33ccf
+4 -1
View File
@@ -217,7 +217,10 @@ export class Buffer implements IBuffer {
// needed here because some chars are 0 characters long (eg. after wide
// chars) and some chars are longer than 1 characters long (eg. emojis).
let startIndex = startCol;
endCol = endCol || line.length;
// Only set endCol to the line length when it is null. 0 is a valid column.
if (endCol === null) {
endCol = line.length;
}
let endIndex = endCol;
for (let i = 0; i < line.length; i++) {