[gnome-builder] sourceview: avoid unnecessary block/unblock of handlers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] sourceview: avoid unnecessary block/unblock of handlers
- Date: Thu, 17 Nov 2016 08:23:40 +0000 (UTC)
commit 529dd4ef92f2758ccd344bcbbdd3107ed3ce6f35
Author: Christian Hergert <chergert redhat com>
Date: Thu Nov 17 00:16:54 2016 -0800
sourceview: avoid unnecessary block/unblock of handlers
libide/sourceview/ide-source-view.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libide/sourceview/ide-source-view.c b/libide/sourceview/ide-source-view.c
index 9badff1..bd48afc 100644
--- a/libide/sourceview/ide-source-view.c
+++ b/libide/sourceview/ide-source-view.c
@@ -1194,10 +1194,12 @@ ide_source_view__buffer_insert_text_cb (IdeSourceView *self,
g_assert (text != NULL);
g_assert (GTK_IS_TEXT_BUFFER (buffer));
- ide_source_view_block_handlers (self);
if (NULL != (snippet = g_queue_peek_head (priv->snippets)))
- ide_source_snippet_before_insert_text (snippet, buffer, iter, text, len);
- ide_source_view_unblock_handlers (self);
+ {
+ ide_source_view_block_handlers (self);
+ ide_source_snippet_before_insert_text (snippet, buffer, iter, text, len);
+ ide_source_view_unblock_handlers (self);
+ }
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]