mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.1545
Problem: GTK3: horizontal cursor movement in Visual selection not good. Solution: Make it work better. (Kazunobu Kuriyama)
This commit is contained in:
@@ -650,6 +650,7 @@ gui_gtk3_should_draw_cursor(void)
|
||||
{
|
||||
unsigned int cond = 0;
|
||||
cond |= gui_gtk_is_blink_on();
|
||||
if (gui.cursor_col >= gui.col)
|
||||
cond |= is_key_pressed;
|
||||
cond |= gui.in_focus == FALSE;
|
||||
return cond;
|
||||
@@ -685,18 +686,30 @@ draw_event(GtkWidget *widget,
|
||||
const cairo_rectangle_t rect = list->rectangles[i];
|
||||
if (blink_mode)
|
||||
gui_gtk3_redraw(rect.x, rect.y, rect.width, rect.height);
|
||||
else
|
||||
{
|
||||
if (get_real_state() & VISUAL)
|
||||
gui_gtk3_redraw(rect.x, rect.y,
|
||||
rect.width, rect.height);
|
||||
else
|
||||
gui_redraw(rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
cairo_rectangle_list_destroy(list);
|
||||
|
||||
if (get_real_state() & VISUAL)
|
||||
{
|
||||
if (gui.cursor_row == gui.row && gui.cursor_col >= gui.col)
|
||||
gui_update_cursor(TRUE, TRUE);
|
||||
}
|
||||
|
||||
cairo_paint(cr);
|
||||
}
|
||||
gui.by_signal = FALSE;
|
||||
|
||||
/* Add the cursor to the window if necessary.*/
|
||||
if (gui_gtk3_should_draw_cursor())
|
||||
if (gui_gtk3_should_draw_cursor() && blink_mode)
|
||||
gui_gtk3_update_cursor(cr);
|
||||
|
||||
return FALSE;
|
||||
|
@@ -743,6 +743,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1545,
|
||||
/**/
|
||||
1544,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user