[gtksourceview/wip/albfan/source-mark-no-attr] go to next mark if there're no attributes on mark




commit ab47b2addcf01467a246d89c82965a52a3141d19
Author: Alberto Fanjul <albfan gnome org>
Date:   Thu Sep 29 23:39:48 2022 +0200

    go to next mark if there're no attributes on mark

 gtksourceview/gtksourcegutterrenderermarks.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutterrenderermarks.c b/gtksourceview/gtksourcegutterrenderermarks.c
index d49a29dc..70ab33d9 100644
--- a/gtksourceview/gtksourcegutterrenderermarks.c
+++ b/gtksourceview/gtksourcegutterrenderermarks.c
@@ -118,18 +118,16 @@ composite_marks (GtkSourceView                 *view,
                                                             gtk_source_mark_get_category (mark),
                                                             NULL);
 
-               if (attrs == NULL)
-               {
-                       continue;
-               }
-
-               paintable = gtk_source_mark_attributes_render_icon (attrs,
-                                                                   GTK_WIDGET (view),
-                                                                   size);
-
-               if (paintable != NULL)
+               if (attrs != NULL)
                {
-                       gtk_source_gutter_renderer_pixbuf_overlay_paintable (renderer, paintable);
+                       paintable = gtk_source_mark_attributes_render_icon (attrs,
+                                                                           GTK_WIDGET (view),
+                                                                           size);
+
+                       if (paintable != NULL)
+                       {
+                               gtk_source_gutter_renderer_pixbuf_overlay_paintable (renderer, paintable);
+                       }
                }
 
                marks = g_slist_next (marks);


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