[gnome-builder] editor: take offset into account when scrolling to location
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: take offset into account when scrolling to location
- Date: Sun, 23 Jul 2017 21:20:37 +0000 (UTC)
commit a5a5b5e27354ead43d8188ebe7fa26e22f259379
Author: Christian Hergert <chergert redhat com>
Date: Sun Jul 23 14:20:19 2017 -0700
editor: take offset into account when scrolling to location
libide/editor/ide-editor-perspective.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libide/editor/ide-editor-perspective.c b/libide/editor/ide-editor-perspective.c
index b6111b5..568b177 100644
--- a/libide/editor/ide-editor-perspective.c
+++ b/libide/editor/ide-editor-perspective.c
@@ -353,6 +353,7 @@ ide_editor_perspective_focus_location_full (IdeEditorPerspective *self,
} lookup = { 0 };
GtkWidget *stack;
guint line;
+ guint line_offset;
g_return_if_fail (IDE_IS_EDITOR_PERSPECTIVE (self));
g_return_if_fail (location != NULL);
@@ -400,10 +401,11 @@ ide_editor_perspective_focus_location_full (IdeEditorPerspective *self,
}
line = ide_source_location_get_line (location);
+ line_offset = ide_source_location_get_line_offset (location);
stack = gtk_widget_get_ancestor (GTK_WIDGET (lookup.view), IDE_TYPE_LAYOUT_STACK);
ide_layout_stack_set_visible_child (IDE_LAYOUT_STACK (stack), IDE_LAYOUT_VIEW (lookup.view));
- ide_editor_view_scroll_to_line (lookup.view, line);
+ ide_editor_view_scroll_to_line_offset (lookup.view, line, line_offset);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]