Most terminal emulators can "do" this, but it takes some work:
- Suppose the line you want to move is at the bottom of the screen.
- If you want to move that line up, you would scroll (or "index") the line by sending an escape sequence to the bottom row and (counting!) move the line up by the number of lines you want to scroll.
- Scrolling moves all lines on the screen. You can limit the number of lines which are moved by setting a scrolling region. By doing that, you could keep the lines in the top half of the screen from going away. But lines between the original position of your line and its goal will go away.
That only moves the line up. You can move a line down, similarly, using "reverse indexing". These operations by the way are not in the standard ECMA-48, but are in anything like xterm (based on DEC vt100).
ansi-term supports scrolling/indexing.
Finally, that's just up or down. To move a line left/right, you would send escape sequences for inserting or deleting characters while the cursor is at the beginning of the line.
These escape sequences are documented in the
terminfo(5) manual page. I've mentioned these:
csr (set scrolling region)
ich (insert character)
dch (delete character)