[gnome-builder] auto-indent: don't format ) inside of c89 comments.



commit 4975291e3b6e3abc9180a424a3eb547a2062b043
Author: Christian Hergert <christian hergert me>
Date:   Sun Sep 21 14:22:53 2014 -0700

    auto-indent: don't format ) inside of c89 comments.

 src/editor/gb-source-auto-indenter-c.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-source-auto-indenter-c.c b/src/editor/gb-source-auto-indenter-c.c
index 2733035..9a76a5e 100644
--- a/src/editor/gb-source-auto-indenter-c.c
+++ b/src/editor/gb-source-auto-indenter-c.c
@@ -872,6 +872,7 @@ maybe_align_parameters (GbSourceAutoIndenterC *c,
                         GtkTextIter           *begin,
                         GtkTextIter           *end)
 {
+  GtkTextIter match_begin;
   GtkTextIter copy;
   GSList *params = NULL;
   gchar *ret = NULL;
@@ -883,6 +884,9 @@ maybe_align_parameters (GbSourceAutoIndenterC *c,
   g_return_val_if_fail (begin, NULL);
   g_return_val_if_fail (end, NULL);
 
+  if (in_c89_comment (begin, &match_begin))
+    RETURN (NULL);
+
   gtk_text_iter_assign (&copy, begin);
 
   if (gtk_text_iter_backward_char (begin) &&


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