[gnome-builder/gnome-builder-3-24] sourceview: remove chain-up of indentation to GtkSourceView
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-24] sourceview: remove chain-up of indentation to GtkSourceView
- Date: Tue, 29 Aug 2017 20:01:52 +0000 (UTC)
commit 01024df2bcc0c123a814597b8bd47a61afc742c6
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 25 21:55:50 2017 -0700
sourceview: remove chain-up of indentation to GtkSourceView
Now that we mimic GtkSourceView, we do not need to setup the base class
to do it's own indentation.
https://bugzilla.gnome.org/show_bug.cgi?id=785425
libide/sourceview/ide-source-view.c | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/libide/sourceview/ide-source-view.c b/libide/sourceview/ide-source-view.c
index b3879da..1f6bcec 100644
--- a/libide/sourceview/ide-source-view.c
+++ b/libide/sourceview/ide-source-view.c
@@ -845,22 +845,13 @@ ide_source_view_update_auto_indent_override (IdeSourceView *self)
/*
* Updates our override of auto-indent from the GtkSourceView underneath us.
- * Also updates our mode which needs to know if we have an indenter to
- * provide different CSS selectors.
+ * Since we do our own mimicing of GtkSourceView, we always disable it. Also
+ * updates our mode which needs to know if we have an indenter to provide
+ * different CSS selectors.
*/
-
- if (priv->auto_indent && (indenter == NULL))
- {
- gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (self), TRUE);
- if (priv->mode != NULL)
- ide_source_view_mode_set_has_indenter (priv->mode, FALSE);
- }
- else
- {
- gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (self), FALSE);
- if (priv->mode != NULL)
- ide_source_view_mode_set_has_indenter (priv->mode, (indenter != NULL));
- }
+ gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (self), FALSE);
+ if (priv->mode != NULL)
+ ide_source_view_mode_set_has_indenter (priv->mode, !!indenter);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]