[gnome-builder/wip/highlight] highlight: reload highlight engine after diagnosing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/highlight] highlight: reload highlight engine after diagnosing
- Date: Fri, 27 Mar 2015 00:08:10 +0000 (UTC)
commit 1dc2f06e47f603bb04bc295aa4cd37542fcacfe3
Author: Christian Hergert <christian hergert me>
Date: Thu Mar 26 17:08:05 2015 -0700
highlight: reload highlight engine after diagnosing
While it isn't guaranteed that diagnose data will be used for highlighting,
it's likely at the moment (and a convenient place to do this the first
time).
Highlighters can adapt to changes via something else in the future. But
this seems KISS for now.
libide/ide-buffer.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-buffer.c b/libide/ide-buffer.c
index 137ff4e..de0484c 100644
--- a/libide/ide-buffer.c
+++ b/libide/ide-buffer.c
@@ -71,6 +71,7 @@ typedef struct
guint loading : 1;
guint mtime_set : 1;
guint read_only : 1;
+ guint has_done_diagnostics_once : 1;
} IdeBufferPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (IdeBuffer, ide_buffer, GTK_SOURCE_TYPE_BUFFER)
@@ -420,6 +421,12 @@ ide_buffer__diagnostician_diagnose_cb (GObject *object,
if (priv->diagnostics_dirty)
ide_buffer_queue_diagnose (self);
+
+ if (!priv->has_done_diagnostics_once)
+ {
+ priv->has_done_diagnostics_once = TRUE;
+ ide_highlight_engine_rebuild (priv->highlight_engine);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]