MCPcopy
hub / github.com/xtermjs/xterm.js / getLines

Function getLines

src/common/InputHandler.test.ts:30–39  ·  view source on GitHub ↗
(bufferService: IBufferService, limit: number = bufferService.rows)

Source from the content-addressed store, hash-verified

28}
29
30function getLines(bufferService: IBufferService, limit: number = bufferService.rows): string[] {
31 const res: string[] = [];
32 for (let i = 0; i < limit; ++i) {
33 const line = bufferService.buffer.lines.get(i);
34 if (line) {
35 res.push(line.translateToString(true));
36 }
37 }
38 return res;
39}
40
41class TestInputHandler extends InputHandler {
42 public get curAttrData(): IAttributeData { return (this as any)._curAttrData; }

Callers 1

Calls 3

getMethod · 0.65
pushMethod · 0.65
translateToStringMethod · 0.65

Tested by

no test coverage detected