setScrollableRegion
import { setScrollableRegion } from "jsr:@ende/cli/unstable-ansi";function ยท experimental
function setScrollableRegion(x: number = 1, y?: number): stringSets the scrollable region of the display. Allowing either or both the top
and bottom lines to not have their content moved when the scrolling region
is updated. x is the top line of the scrollable region. y is the
bottom line of the scrollable region.
x: number = 1The top line of the scrollable region.
y?: numberThe bottom line of the scrollable region.
Returns
The ANSI escape code to set the scrollable region.
Example: Usage
import * as Ansi from "@ende/cli/unstable-ansi";
console.log(
Ansi.ERASE_DISPLAY +
Ansi.setScrollableRegion(3, 10),
);
setInterval(() => console.log(Math.random()), 1000);