term: move cursor to end before exit

When urbit exits, the host shell it was running in takes over, often
re-prints its own prompt.

Here, we move the cursor to the bottom of the screen right before
exiting, so that any subsequent output doesn't destroy whatever we had
on-screen when we closed.
This commit is contained in:
fang 2022-04-03 21:44:05 +02:00
parent 064b15e5a0
commit d3f9d76217
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -1762,6 +1762,10 @@ _term_io_exit(u3_auto* car_u)
//
_term_it_dump_buf(uty_u, &uty_u->ufo_u.mof_u);
// move cursor to the end
//
_term_it_move_cursor(uty_u, 0, uty_u->tat_u.siz.row_l - 1);
// NB, closed in u3_term_log_exit()
//
uv_read_stop((uv_stream_t*)&(uty_u->pin_u));