Next: , Previous: , Up: Terminal escapes  


1.4.2 Escape commands for erasing text

These commands "erase" part of the sub-buffer. Erasing means replacing by white space; it is not the same as deleting. The relative screen positions of things that are not erased remain unchanged with each other, as does the relative cursor position.

E [ J

Erase from cursor to end of screen.

E [ 0 J

Same as E [ J.

E [ 1 J

Erase from home position to point.

E [ 2 J

Erase whole sub-buffer.

E [ K

Erase from point to end of screen line.

E [ 0 K

Same as E [ K.

E [ 1 K

Erase from beginning of screen line to point.

E [ 2 K

Erase whole screen line.