[gedit] commands-file: use tepl_view_goto_line*()



commit d87bf25ba06983aabeafb6c3e4ebe43bac3e0dc6
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Apr 12 19:46:36 2020 +0200

    commands-file: use tepl_view_goto_line*()
    
    Tested, it works.

 gedit/gedit-commands-file.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index a1d1acc0a..39137c4f8 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -156,26 +156,24 @@ load_file_list (GeditWindow             *window,
                {
                        if (l == files)
                        {
-                               GeditDocument *doc;
+                               TeplView *view;
 
                                gedit_window_set_active_tab (window, tab);
                                jump_to = FALSE;
-                               doc = gedit_tab_get_document (tab);
+                               view = TEPL_VIEW (gedit_tab_get_view (tab));
 
                                if (line_pos > 0)
                                {
                                        if (column_pos > 0)
                                        {
-                                               gedit_document_goto_line_offset (doc,
-                                                                                line_pos - 1,
-                                                                                column_pos - 1);
+                                               tepl_view_goto_line_offset (view,
+                                                                           line_pos - 1,
+                                                                           column_pos - 1);
                                        }
                                        else
                                        {
-                                               gedit_document_goto_line (doc, line_pos - 1);
+                                               tepl_view_goto_line (view, line_pos - 1);
                                        }
-
-                                       tepl_view_scroll_to_cursor (TEPL_VIEW (gedit_tab_get_view (tab)));
                                }
                        }
 


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