ENABLE_ORIGIN_MODE
import { ENABLE_ORIGIN_MODE } from "jsr:@ende/cli/unstable-ansi";variable ยท experimental
const ENABLE_ORIGIN_MODE: "\u001b[?6h"Causes top and bottom margins to shrink to scrollable region (See
setScrollableRegion) preventing the cursor from moving
to the lines outside it.
Returns
The ANSI escape code for enabling origin mode.
Example: Usage
import { delay } from "@ende/async/delay";
import * as Ansi from "@ende/cli/unstable-ansi";
console.log(
Ansi.ERASE_DISPLAY +
Ansi.setCursorPosition() +
"Hello World" +
Ansi.setScrollableRegion(2) +
Ansi.ENABLE_ORIGIN_MODE,
);
await delay(1000);
console.log(Ansi.setCursorPosition() + "Bye World!");