(data: IPartialLineData[])
| 267 | type IPartialLineData = ([string] | [string, number]); |
| 268 | |
| 269 | function lineData(data: IPartialLineData[]): IBufferLine { |
| 270 | const tline = new BufferLine(0); |
| 271 | for (let i = 0; i < data.length; ++i) { |
| 272 | const line = data[i][0]; |
| 273 | const attr = (data[i][1] || 0) as number; |
| 274 | const offset = tline.length; |
| 275 | tline.resize(tline.length + line.split('').length, CellData.fromCharData([0, '', 0, 0])); |
| 276 | line.split('').map((char, idx) => tline.setCell(idx + offset, CellData.fromCharData([attr, char, 1, char.charCodeAt(0)]))); |
| 277 | } |
| 278 | return tline; |
| 279 | } |
| 280 | |
| 281 | function substringJoiner(substring: string): (sequence: string) => [number, number][] { |
| 282 | return (sequence: string): [number, number][] => { |
no test coverage detected