[gnome-builder] vim: no need to apply scrolloff when jumping to line



commit aa93d82680205e523eda896bf57eab7278d5e8ad
Author: Christian Hergert <christian hergert me>
Date:   Sun Jan 18 15:09:04 2015 -0800

    vim: no need to apply scrolloff when jumping to line
    
    We just center the line vertically to match VIM.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743138

 src/vim/gb-source-vim.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index 0e45a22..a217d42 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -2571,7 +2571,8 @@ gb_source_vim_move_to_line_n (GbSourceVim *vim,
 
   vim->priv->target_line_offset = gb_source_vim_get_line_offset (vim);
 
-  gb_source_vim_ensure_scroll_off (vim, GB_SOURCE_VIM_ITER_BOUND_START);
+  gtk_text_view_scroll_to_iter (vim->priv->text_view, &iter, 0.0, TRUE,
+                                0.0, 0.5);
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]