partially apply fast data access in InputHandler.print

This commit is contained in:
Jörg Breitbart
2019-01-03 21:40:34 +01:00
parent f63223f8d8
commit b0eecea45a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -435,14 +435,14 @@ export class InputHandler extends Disposable implements IInputHandler {
}
// write current char to buffer and advance cursor
bufferRow.set(buffer.x++, [curAttr, stringFromCodePoint(code), chWidth, code]);
bufferRow.setDataFromCodePoint(buffer.x++, code, chWidth, curAttr, 0);
// fullwidth char - also set next cell to placeholder stub and advance cursor
// for graphemes bigger than fullwidth we can simply loop to zero
// we already made sure above, that buffer.x + chWidth will not overflow right
if (chWidth > 0) {
while (--chWidth) {
bufferRow.set(buffer.x++, [curAttr, '', 0, undefined]);
bufferRow.setDataFromCodePoint(buffer.x++, 0, 0, curAttr, 0);
}
}
}