terminal: fix some bad cursor visibility

This commit is contained in:
K. Lange 2018-12-03 11:31:16 +09:00
parent 131262bb1f
commit 625bdb6f96
3 changed files with 3 additions and 1 deletions

View File

@ -636,6 +636,7 @@ static void cell_redraw_box(uint16_t x, uint16_t y) {
#endif
void render_cursor() {
if (!cursor_on) return;
cell_redraw_inverted(csr_x, csr_y);
}

View File

@ -1108,6 +1108,7 @@ static void cell_redraw_box(uint16_t x, uint16_t y) {
/* Draw the cursor cell */
static void render_cursor() {
if (!cursor_on) return;
if (!window->focused) {
/* An unfocused terminal should draw an unfilled box. */
cell_redraw_box(csr_x, csr_y);

View File

@ -1612,7 +1612,7 @@ int rline_experimental(char * buffer, int buf_size) {
the_line = line_create();
loading = 0;
read_line();
printf("\033[0m\n");
printf("\033[?25h\033[0m\n");
unsigned int off = 0;
for (int j = 0; j < the_line->actual; j++) {