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

Function resetToBaseState

src/common/InputHandler.test.ts:404–414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

402 );
403
404 const resetToBaseState = async (): Promise<void> => {
405 // reset and add a wrapped line
406 bufferService.buffer.y = 0;
407 bufferService.buffer.x = 0;
408 await inputHandler.parseP(Array(bufferService.cols + 1).join('a')); // line 0
409 await inputHandler.parseP(Array(bufferService.cols + 10).join('a')); // line 1 and 2
410 for (let i = 3; i < bufferService.rows; ++i) await inputHandler.parseP(Array(bufferService.cols + 1).join('a'));
411
412 // confirm precondition that line 2 is wrapped
413 assert.equal(bufferService.buffer.lines.get(2)!.isWrapped, true);
414 };
415
416 // params[0] - erase from the cursor through the end of the row.
417 await resetToBaseState();

Callers 1

Calls 3

parsePMethod · 0.80
joinMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected