[gnome-builder] highlight-engine: short circuit when not enabled
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] highlight-engine: short circuit when not enabled
- Date: Fri, 11 Nov 2016 03:17:33 +0000 (UTC)
commit 63614ec2568cb19dec43a642ef1bd8c97fd91682
Author: Christian Hergert <chergert redhat com>
Date: Thu Nov 10 18:40:35 2016 -0800
highlight-engine: short circuit when not enabled
libide/highlighting/ide-highlight-engine.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libide/highlighting/ide-highlight-engine.c b/libide/highlighting/ide-highlight-engine.c
index 2c26eeb..440d51b 100644
--- a/libide/highlighting/ide-highlight-engine.c
+++ b/libide/highlighting/ide-highlight-engine.c
@@ -521,6 +521,9 @@ ide_highlight_engine__buffer_insert_text_cb (IdeHighlightEngine *self,
g_assert (text);
g_assert (IDE_IS_BUFFER (buffer));
+ if (!self->enabled)
+ IDE_EXIT;
+
/*
* Backward the begin iter len characters from location
* (location points to the end of the string) in order to get
@@ -551,6 +554,9 @@ ide_highlight_engine__buffer_delete_range_cb (IdeHighlightEngine *self,
g_assert (range_begin);
g_assert (IDE_IS_BUFFER (buffer));
+ if (!self->enabled)
+ IDE_EXIT;
+
/*
* No need to use the range_end since everything that
* was after range_end will now be after range_begin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]