Use a const for all refs to data char and width

Part of #791
This commit is contained in:
Daniel Imms
2017-08-07 15:40:48 -07:00
parent c2bb507fe4
commit fd61c8e874
6 changed files with 140 additions and 139 deletions
+3 -2
View File
@@ -4,6 +4,7 @@
import { ITerminal } from './Interfaces';
import { DomElementObjectPool } from './utils/DomElementObjectPool';
import { CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX } from './Buffer';
/**
* The maximum number of refresh frames to skip when the write buffer is non-
@@ -168,8 +169,8 @@ export class Renderer {
for (let i = 0; i < width; i++) {
// TODO: Could data be a more specific type?
let data: any = line[i][0];
const ch = line[i][1];
const ch_width: any = line[i][2];
const ch = line[i][CHAR_DATA_CHAR_INDEX];
const ch_width: any = line[i][CHAR_DATA_WIDTH_INDEX];
const isCursor: boolean = i === x;
if (!ch_width) {
continue;