if (!o)
return NULL;
+ /* re-enable cursor */
+ output_printf(o, "\e[?25h");
/* disable alternate screen buffer */
output_printf(o, "\e[?1049l");
output_flush(o);
if (r < 0)
goto error;
+ /* always hide cursor */
+ r = output_printf(o, "\e[?25l");
+ if (r < 0)
+ goto error;
+
r = output_flush(o);
if (r < 0)
goto error;
output_printf(o, "\e[38;2;%u;%u;%um", attr->fg.red, attr->fg.green, attr->fg.blue);
break;
case TERM_CCODE_BLACK ... TERM_CCODE_WHITE:
- if (attr->bold)
- output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_BLACK + 90);
- else
- output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_BLACK + 30);
+ output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_BLACK + 30);
break;
case TERM_CCODE_LIGHT_BLACK ... TERM_CCODE_LIGHT_WHITE:
output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_LIGHT_BLACK + 90);
term_screen_draw(s, output_draw_cell_fn, o, NULL);
- output_move_to(o, s->cursor_x + 1, s->cursor_y + 3);
output_printf(o, "\e[m");
}
else
output_draw_screen(o, screen);
- /* show cursor */
- if (!(screen->flags & TERM_FLAG_HIDE_CURSOR))
- output_printf(o, "\e[?25h");
-
/*
* Hack: sd-term was not written to support TTY as output-objects, thus
* expects callers to use term_screen_feed_keyboard(). However, we