From 12fce6ddb76546f2f3a397386944431153769841 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 4 Jun 2020 14:54:41 -0400 Subject: [PATCH] notcurses: flush cursor change requests #673 --- src/lib/notcurses.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index 6eefa15ef..0774c498e 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -852,16 +852,16 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){ if((ret->stdscr = create_initial_ncplane(ret, dimy, dimx)) == NULL){ goto err; } - if(!opts->retain_cursor){ - if(ret->tcache.civis && term_emit("civis", ret->tcache.civis, ret->ttyfp, false)){ - free_plane(ret->top); - goto err; - } - } if(ret->tcache.smkx && term_emit("smkx", ret->tcache.smkx, ret->ttyfp, false)){ free_plane(ret->top); goto err; } + if(!opts->retain_cursor){ + if(ret->tcache.civis && term_emit("civis", ret->tcache.civis, ret->ttyfp, true)){ + free_plane(ret->top); + goto err; + } + } if((ret->rstate.mstreamfp = open_memstream(&ret->rstate.mstream, &ret->rstate.mstrsize)) == NULL){ free_plane(ret->top); goto err; @@ -1718,13 +1718,13 @@ void ncplane_erase(ncplane* n){ void notcurses_cursor_enable(notcurses* nc){ if(nc->tcache.cnorm){ - term_emit("cnorm", nc->tcache.cnorm, nc->ttyfp, false); + term_emit("cnorm", nc->tcache.cnorm, nc->ttyfp, true); } } void notcurses_cursor_disable(notcurses* nc){ if(nc->tcache.civis){ - term_emit("civis", nc->tcache.civis, nc->ttyfp, false); + term_emit("civis", nc->tcache.civis, nc->ttyfp, true); } }