diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-11-20 22:23:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-11-20 22:23:57 (GMT) |
commit | d4239799ad149f65e1e480d898ccb16756f4d518 (patch) | |
tree | 2652094bd458505edb9dbcfb7db1c1a8170ce6f1 /src/gtkext/gtkbufferdisplay.c | |
parent | 7c1f85b8197cb02634d06d200f68ce65e9eca717 (diff) |
Located the caret at the right position in case of minimal widths.
Diffstat (limited to 'src/gtkext/gtkbufferdisplay.c')
-rw-r--r-- | src/gtkext/gtkbufferdisplay.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gtkext/gtkbufferdisplay.c b/src/gtkext/gtkbufferdisplay.c index 6329668..1989b1c 100644 --- a/src/gtkext/gtkbufferdisplay.c +++ b/src/gtkext/gtkbufferdisplay.c @@ -524,7 +524,8 @@ static gboolean gtk_buffer_display_key_press(GtkWidget *widget, GdkEventKey *eve ctrl = (event->state & GDK_CONTROL_MASK); area = display->caret; - status = g_buffer_view_move_caret(display->view, ctrl, dir, panel->options, &area, &cursor); + status = g_buffer_view_move_caret(display->view, ctrl, dir, panel->options, &display->offsets, + &area, &cursor); if (status) { @@ -745,7 +746,8 @@ GObject *gtk_buffer_display_get_active_object(const GtkBufferDisplay *display) else result = g_buffer_view_find_creator(display->view, display->caret.x, display->caret.y, - GTK_DISPLAY_PANEL(display)->options); + GTK_DISPLAY_PANEL(display)->options, + &display->offsets); return result; @@ -833,7 +835,8 @@ static bool _gtk_buffer_display_move_caret_to(GtkBufferDisplay *display, gint x, panel = GTK_DISPLAY_PANEL(display); - result = g_buffer_view_compute_caret_full(display->view, x, y, panel->options, &new, &cursor); + result = g_buffer_view_compute_caret_full(display->view, x, y, panel->options, &display->offsets, + &new, &cursor); if (result) gtk_buffer_display_relocate_caret(display, &new, cursor); |