[gtksourceview/gnome-3-18] view: small code simplification in compute_indentation()



commit 9edc23b19efe3794004b1bedc9dbe0cc0f4a4ae2
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Oct 18 12:07:30 2015 +0200

    view: small code simplification in compute_indentation()

 gtksourceview/gtksourceview.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index cd34ecc..4f51573 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -3354,15 +3354,10 @@ compute_indentation (GtkSourceView *view,
 {
        GtkTextIter start;
        GtkTextIter end;
-
        gunichar ch;
-       gint line;
-
-       line = gtk_text_iter_get_line (cur);
 
-       gtk_text_buffer_get_iter_at_line (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)),
-                                         &start,
-                                         line);
+       start = *cur;
+       gtk_text_iter_set_line_offset (&start, 0);
 
        end = start;
 


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