ansi/cursor
src/ansi/cursor.tur
terminal cursor positioning and visibility via ANSI CSI.
defn
cursor-move-to
(cursor-move-to [row :int col :int])
move the cursor to an absolute 1-based (row col).
Parameters
| row | 1-based row (top is 1) | |
| col | 1-based column (leftmost is 1) |
Example
(cursor-move-to 1 1) ; home the cursor
Since: tur-ansi AN0
defn
cursor-up
(cursor-up [n :int])
move the cursor up n rows (clamped at top of screen).
defn
cursor-down
(cursor-down [n :int])
move the cursor down n rows (clamped at bottom).
defn
cursor-right
(cursor-right [n :int])
move the cursor right n columns (clamped at right edge).
defn
cursor-left
(cursor-left [n :int])
move the cursor left n columns (clamped at left edge).
defn
cursor-col
(cursor-col [col :int])
move to a column on the current row (CSI <n> G).
defn
cursor-show
(cursor-show)
make the cursor visible (DECTCEM h).
defn
cursor-hide
(cursor-hide)
hide the cursor (DECTCEM l).
defn
cursor-save
(cursor-save)
save current cursor position (DEC SC, ESC 7).
defn
cursor-restore
(cursor-restore)
restore previously saved cursor position (DEC RC, ESC 8).