[gnome-builder/auto-indent] auto-indent: make , work again.



commit 129fc58cc2063287c4501b436ad2ea3689ec9ff2
Author: Christian Hergert <christian hergert me>
Date:   Wed Sep 17 23:15:12 2014 -0700

    auto-indent: make , work again.

 src/editor/gb-editor-tab.c             |    2 +-
 src/editor/gb-source-auto-indenter-c.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index 8351e6d..f3792c6 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -377,8 +377,8 @@ gb_editor_tab_language_changed (GbEditorTab      *tab,
                                 GParamSpec       *pspec,
                                 GbEditorDocument *document)
 {
-  GtkSourceLanguage *language;
   GbSourceAutoIndenter *indenter = NULL;
+  GtkSourceLanguage *language;
 
   g_return_if_fail (GB_IS_EDITOR_TAB (tab));
   g_return_if_fail (GB_IS_EDITOR_DOCUMENT (document));
diff --git a/src/editor/gb-source-auto-indenter-c.c b/src/editor/gb-source-auto-indenter-c.c
index bc69096..4a97f9a 100644
--- a/src/editor/gb-source-auto-indenter-c.c
+++ b/src/editor/gb-source-auto-indenter-c.c
@@ -338,6 +338,8 @@ gb_source_auto_indenter_c_indent (GbSourceAutoIndenterC *c,
    */
   ch = gtk_text_iter_get_char (iter);
 
+  g_print ("char is now: %c\n", ch);
+
   /*
    * If we just placed a terminating parenthesis, we need to work our way back
    * to it's match. That way we can peak at what it was and determine
@@ -454,6 +456,7 @@ gb_source_auto_indenter_c_format (GbSourceAutoIndenter *indenter,
   case GDK_KEY_KP_Enter:
     gtk_text_iter_assign (&begin_copy, begin);
     ret = gb_source_auto_indenter_c_indent (c, view, buffer, begin);
+    g_print ("INDENT: \"%s\"\n", ret);
     gtk_text_iter_assign (begin, &begin_copy);
     break;
 


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