@@ -650,7 +650,8 @@ gui_gtk3_should_draw_cursor(void)
650650{
651651 unsigned int cond = 0 ;
652652 cond |= gui_gtk_is_blink_on ();
653- cond |= is_key_pressed ;
653+ if (gui .cursor_col >= gui .col )
654+ cond |= is_key_pressed ;
654655 cond |= gui .in_focus == FALSE;
655656 return cond ;
656657}
@@ -686,17 +687,29 @@ draw_event(GtkWidget *widget,
686687 if (blink_mode )
687688 gui_gtk3_redraw (rect .x , rect .y , rect .width , rect .height );
688689 else
689- gui_redraw (rect .x , rect .y , rect .width , rect .height );
690+ {
691+ if (get_real_state () & VISUAL )
692+ gui_gtk3_redraw (rect .x , rect .y ,
693+ rect .width , rect .height );
694+ else
695+ gui_redraw (rect .x , rect .y , rect .width , rect .height );
696+ }
690697 }
691698 }
692699 cairo_rectangle_list_destroy (list );
693700
701+ if (get_real_state () & VISUAL )
702+ {
703+ if (gui .cursor_row == gui .row && gui .cursor_col >= gui .col )
704+ gui_update_cursor (TRUE, TRUE);
705+ }
706+
694707 cairo_paint (cr );
695708 }
696709 gui .by_signal = FALSE;
697710
698711 /* Add the cursor to the window if necessary.*/
699- if (gui_gtk3_should_draw_cursor ())
712+ if (gui_gtk3_should_draw_cursor () && blink_mode )
700713 gui_gtk3_update_cursor (cr );
701714
702715 return FALSE;
0 commit comments