From eb4b7f180fc68649327afb3c8c4fa7886b04968d Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 10 Oct 2016 21:30:44 +0000 Subject: console: ptyc_flush_screen_buffer(): maintain cursor visibility as needed. --- src/console/ptyc_console_writer.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src') 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; -- cgit v1.2.3