[gnome-builder] auto-indent: only enable auto-indent for C and Headers.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] auto-indent: only enable auto-indent for C and Headers.
- Date: Thu, 25 Sep 2014 20:27:41 +0000 (UTC)
commit e1666c1fef705ea5c7a1e1cb1145b1f74bcce875
Author: Christian Hergert <christian hergert me>
Date: Thu Sep 25 13:27:36 2014 -0700
auto-indent: only enable auto-indent for C and Headers.
We will probably expand this a bit later, as we add more features to the
indenter parser.
src/editor/gb-editor-tab.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index c3ceeb0..8fae8fc 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -392,7 +392,8 @@ gb_editor_tab_language_changed (GbEditorTab *tab,
{
const gchar *lang_id = gtk_source_language_get_id (language);
- if (lang_id)
+ if ((g_strcmp0 (lang_id, "c") == 0) ||
+ (g_strcmp0 (lang_id, "chdr") == 0))
indenter = gb_source_auto_indenter_c_new ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]