diff options
author | midipix <writeonce@midipix.org> | 2016-10-10 21:30:44 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-10-25 00:09:51 -0400 |
commit | eb4b7f180fc68649327afb3c8c4fa7886b04968d (patch) | |
tree | e4fc166cc04fde8bccd9d4a44d7f40de4ff89228 | |
parent | a88b38c9adca0c2686f3c27d2ea812d503cc3062 (diff) | |
download | ptycon-eb4b7f180fc68649327afb3c8c4fa7886b04968d.tar.bz2 ptycon-eb4b7f180fc68649327afb3c8c4fa7886b04968d.tar.xz |
console: ptyc_flush_screen_buffer(): maintain cursor visibility as needed.
-rw-r--r-- | src/console/ptyc_console_writer.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/console/ptyc_console_writer.c b/src/console/ptyc_console_writer.c index 1729ea9..24509f8 100644 --- a/src/console/ptyc_console_writer.c +++ b/src/console/ptyc_console_writer.c @@ -159,13 +159,16 @@ static void * __fastcall ptyc_flush_screen_buffer(struct ptyc_term_ctx * tctx) &nwritten, 0); - ntcon->get_console_screen_buffer_info( - tctx->hout, - &tctx->screen_info); - - ntcon->set_console_cursor_position( - tctx->hout, - tctx->screen_info.cursor_position); + /* heuristics: interactive input? */ + if (ncunits <= 4) { + ntcon->get_console_screen_buffer_info( + tctx->hout, + &tctx->screen_info); + + ntcon->set_console_cursor_position( + tctx->hout, + tctx->screen_info.cursor_position); + } tctx->wch_con = tctx->data.screen; |