@@ -650,7 +650,8 @@ gui_gtk3_should_draw_cursor(void)
650
650
{
651
651
unsigned int cond = 0 ;
652
652
cond |= gui_gtk_is_blink_on ();
653
- cond |= is_key_pressed ;
653
+ if (gui .cursor_col >= gui .col )
654
+ cond |= is_key_pressed ;
654
655
cond |= gui .in_focus == FALSE;
655
656
return cond ;
656
657
}
@@ -686,17 +687,29 @@ draw_event(GtkWidget *widget,
686
687
if (blink_mode )
687
688
gui_gtk3_redraw (rect .x , rect .y , rect .width , rect .height );
688
689
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
+ }
690
697
}
691
698
}
692
699
cairo_rectangle_list_destroy (list );
693
700
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
+
694
707
cairo_paint (cr );
695
708
}
696
709
gui .by_signal = FALSE;
697
710
698
711
/* Add the cursor to the window if necessary.*/
699
- if (gui_gtk3_should_draw_cursor ())
712
+ if (gui_gtk3_should_draw_cursor () && blink_mode )
700
713
gui_gtk3_update_cursor (cr );
701
714
702
715
return FALSE;
0 commit comments