[gtksourceview] Bracket matching: avoid an indentation level



commit 2cff8803aa97ed9e32445daf3c8d8418fb8d79df
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Oct 24 13:59:49 2015 +0200

    Bracket matching: avoid an indentation level
    
    There is a quite long line, so when possible it's always better to avoid
    unnecessary indentation levels.

 gtksourceview/gtksourcebuffer.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index 4835c40..c9132ae 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -778,17 +778,19 @@ gtk_source_buffer_can_redo_handler (GtkSourceUndoManager *manager,
 static void
 update_bracket_match_style (GtkSourceBuffer *buffer)
 {
-       if (buffer->priv->bracket_match_tag != NULL)
-       {
-               GtkSourceStyle *style = NULL;
+       GtkSourceStyle *style = NULL;
 
-               if (buffer->priv->style_scheme != NULL)
-               {
-                       style = _gtk_source_style_scheme_get_matching_brackets_style 
(buffer->priv->style_scheme);
-               }
+       if (buffer->priv->bracket_match_tag == NULL)
+       {
+               return;
+       }
 
-               _gtk_source_style_apply (style, buffer->priv->bracket_match_tag);
+       if (buffer->priv->style_scheme != NULL)
+       {
+               style = _gtk_source_style_scheme_get_matching_brackets_style (buffer->priv->style_scheme);
        }
+
+       _gtk_source_style_apply (style, buffer->priv->bracket_match_tag);
 }
 
 static GtkTextTag *


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