[gnome-builder] vim: fix view recentering after H,L,M and z motions
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: fix view recentering after H,L,M and z motions
- Date: Tue, 17 Nov 2015 20:32:48 +0000 (UTC)
commit ace4da2573230136b6573c5769b5ec5b62b88a61
Author: Sebastien Lafargue <slafargue gnome org>
Date: Tue Nov 17 21:28:21 2015 +0100
vim: fix view recentering after H,L,M and z motions
libide/ide-source-view-movements.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view-movements.c b/libide/ide-source-view-movements.c
index add0a2e..bce4b96 100644
--- a/libide/ide-source-view-movements.c
+++ b/libide/ide-source-view-movements.c
@@ -649,6 +649,8 @@ ide_source_view_movements_screen_top (Movement *mv)
ide_source_view_get_visible_rect (mv->self, &rect);
gtk_text_view_get_iter_at_location (text_view, &mv->insert, rect.x, rect.y);
gtk_text_iter_set_line_offset (&mv->insert, 0);
+
+ mv->ignore_scroll_to_insert = TRUE;
}
static void
@@ -660,6 +662,8 @@ ide_source_view_movements_screen_middle (Movement *mv)
ide_source_view_get_visible_rect (mv->self, &rect);
gtk_text_view_get_iter_at_location (text_view, &mv->insert, rect.x, rect.y + (rect.height / 2));
gtk_text_iter_set_line_offset (&mv->insert, 0);
+
+ mv->ignore_scroll_to_insert = TRUE;
}
static void
@@ -671,6 +675,8 @@ ide_source_view_movements_screen_bottom (Movement *mv)
ide_source_view_get_visible_rect (mv->self, &rect);
gtk_text_view_get_iter_at_location (text_view, &mv->insert, rect.x, rect.y + rect.height - 1);
gtk_text_iter_set_line_offset (&mv->insert, 0);
+
+ mv->ignore_scroll_to_insert = TRUE;
}
static void
@@ -736,6 +742,8 @@ ide_source_view_movements_scroll (Movement *mv)
mark = gtk_text_buffer_get_insert (buffer);
gtk_text_buffer_get_iter_at_mark (buffer, &mv->insert, mark);
ide_source_view_move_mark_onscreen (mv->self, mark);
+
+ mv->ignore_scroll_to_insert = TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]