SAVE_CURSOR
import { SAVE_CURSOR } from "jsr:@ende/cli/unstable-ansi";variable ยท experimental
const SAVE_CURSOR: "\u001b7"Saves:
- cursor position
- graphic rendition
- character set shift state
- state of wrap flag
ENABLE_AUTO_WRAP - state of origin mode
ENABLE_ORIGIN_MODE - selective eraser
Can be restored with RESTORE_CURSOR.
Returns
The ANSI escape code for saving cursor.
Example: Usage
import * as Ansi from "@ende/cli/unstable-ansi";
console.log(
Ansi.SAVE_CURSOR +
Ansi.setCursorPosition(Ende.consoleSize().rows, 1) +
Ansi.ERASE_LINE +
"Hello World!" +
Ansi.RESTORE_CURSOR,
);