remove get CharData from codebase and deprecate method

This commit is contained in:
Jörg Breitbart
2019-01-12 17:50:19 +01:00
parent ece7192db7
commit 711ae65947
9 changed files with 221 additions and 199 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import { assert } from 'chai';
import { getStringCellWidth, wcwidth } from './CharWidth';
import { IBuffer } from './Types';
import { CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX } from './Buffer';
import { CellData } from './BufferLine';
describe('getStringCellWidth', function(): void {
@@ -22,7 +23,7 @@ describe('getStringCellWidth', function(): void {
for (let i = start; i < end; ++i) {
const line = buffer.lines.get(i);
for (let j = 0; j < line.length; ++j) { // TODO: change to trimBorder with multiline
const ch = line.get(j);
const ch = line.loadCell(j, new CellData()).asCharData;
result += ch[CHAR_DATA_WIDTH_INDEX];
// return on sentinel
if (ch[CHAR_DATA_CHAR_INDEX] === sentinel) {