Expand description
Screen, line, scroll-region, and tab-stop manipulation.
§Category
This module emits CSI controls for erasing, inserting/deleting characters and lines, scrolling, setting vertical and horizontal margins, and tab-stop management.
§CSI conventions
Counted operations use the terminal default parameter where possible: for
example n <= 1 emits ESC [ X for ECH and ESC [ L for IL. Erase
operations use parameter 0 as the omitted default.
§Mode interaction
Left/right margins are interpreted as DECSLRM when
Mode::LEFT_RIGHT_MARGIN is
enabled. Top/bottom scroll margins are set by DECSTBM and affect absolute
cursor movement when origin mode is active.
Constants§
- ERASE_
ENTIRE_ DISPLAY - Erase the display including scrollback where supported: exact bytes
ESC [ 3 J(ED 3). - ERASE_
ENTIRE_ LINE - Erase the entire current line: exact bytes
ESC [ 2 K(EL 2). - ERASE_
ENTIRE_ SCREEN - Erase the visible screen: exact bytes
ESC [ 2 J(ED 2). - ERASE_
LINE_ LEFT - Erase from start of line through cursor: exact bytes
ESC [ 1 K(EL 1). - ERASE_
LINE_ RIGHT - Erase from cursor through end of line: exact bytes
ESC [ K(EL 0). - ERASE_
SCREEN_ ABOVE - Erase from start of screen through cursor: exact bytes
ESC [ 1 J(ED 1). - ERASE_
SCREEN_ BELOW - Erase from cursor through end of screen: exact bytes
ESC [ J(ED 0). - HORIZONTAL_
TAB_ SET - Set a horizontal tab stop at the current column: exact bytes
ESC H(HTS 7-bit form). - SET_
TAB_ EVERY_ 8_ COLUMNS - Set tab stops every eight columns: exact bytes
ESC [ ? 5 W(DECST8C).
Functions§
- write_
dch - Delete
ncharacter cells at the cursor with DCH. - write_
delete_ lines - Delete
nlines with DL. - write_
ech - Erase
ncharacter cells at the cursor with ECH. - write_
ed - Erase in display with ED,
ESC [ <n> J. - write_
el - Erase in line with EL,
ESC [ <n> K. - write_
erase_ below - Write
ERASE_SCREEN_BELOW,ESC [ J, erasing from cursor through end of screen. - write_
erase_ line - Write
ERASE_ENTIRE_LINE,ESC [ 2 K, erasing the entire current line. - write_
erase_ screen - Write
ERASE_ENTIRE_SCREEN,ESC [ 2 J, erasing the visible screen. - write_
erase_ to_ eol - Write
ERASE_LINE_RIGHT,ESC [ K, erasing from cursor through end of line. - write_
hts - Write
HORIZONTAL_TAB_SET,ESC H, to set a tab stop at the current cursor column. - write_
ich - Insert
nblank character cells at the cursor with ICH. - write_
insert_ lines - Insert
nblank lines with IL. - write_
rep - Repeat the preceding printable character with REP.
- write_
reset_ scroll_ region - Reset top/bottom margins to the full screen with exact bytes
ESC [ r. - write_
reset_ tab_ stops_ every_ 8 - Reset tab stops to one every eight columns without DECST8C.
- write_
scroll_ down - Scroll down by
nlines with SD. - write_
scroll_ region - Set top and bottom margins with DECSTBM,
ESC [ <top+1> ; <bottom+1> r. - write_
scroll_ up - Scroll up by
nlines with SU. - write_
set_ left_ right_ margins - Set left and right margins with DECSLRM,
ESC [ <left> ; <right> s. - write_
tbc - Clear tab stops with TBC,
ESC [ <n> g.