summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-12 16:28:18 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-12 16:28:18 +0100
commitb4ebf9ae3b93d082ab3b9f4aab2f6729f77fa46a (patch)
tree0d27a94b49e12cf8a2c7edd7aa77d6017d07c0e2 /src/gui_gtk_x11.c
parent583c1f14a4e1d89fe029b1c134d405357468ece7 (diff)
patch 7.4.1545v7.4.1545
Problem: GTK3: horizontal cursor movement in Visual selection not good. Solution: Make it work better. (Kazunobu Kuriyama)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 54723f7d07..aa4137ac5f 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -650,7 +650,8 @@ gui_gtk3_should_draw_cursor(void)
{
unsigned int cond = 0;
cond |= gui_gtk_is_blink_on();
- cond |= is_key_pressed;
+ if (gui.cursor_col >= gui.col)
+ cond |= is_key_pressed;
cond |= gui.in_focus == FALSE;
return cond;
}
@@ -686,17 +687,29 @@ draw_event(GtkWidget *widget,
if (blink_mode)
gui_gtk3_redraw(rect.x, rect.y, rect.width, rect.height);
else
- gui_redraw(rect.x, rect.y, rect.width, rect.height);
+ {
+ 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;
E_ami.txt" for installation instructions for the Amiga. These files are in the runtime archive (vim60rt.tgz). The Amiga source archive contains the files needed to compile Vim on the Amiga. See "src/INSTALLami.txt" for instructions on how to compile Vim on the Amiga.