[gnome-builder] buffer: ignore mark-set while loading the buffer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] buffer: ignore mark-set while loading the buffer
- Date: Thu, 14 Jun 2018 21:56:45 +0000 (UTC)
commit f640ea2c8a11b23c0bd8938a670a22c3207e7377
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 14 14:56:06 2018 -0700
buffer: ignore mark-set while loading the buffer
src/libide/buffers/ide-buffer.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/libide/buffers/ide-buffer.c b/src/libide/buffers/ide-buffer.c
index 2bb237eb9..5448a13af 100644
--- a/src/libide/buffers/ide-buffer.c
+++ b/src/libide/buffers/ide-buffer.c
@@ -806,8 +806,16 @@ ide_buffer_mark_set (GtkTextBuffer *buffer,
const GtkTextIter *iter,
GtkTextMark *mark)
{
+ IdeBuffer *self = (IdeBuffer *)buffer;
+ IdeBufferPrivate *priv = ide_buffer_get_instance_private (self);
+
+ g_assert (IDE_IS_BUFFER (self));
+
GTK_TEXT_BUFFER_CLASS (ide_buffer_parent_class)->mark_set (buffer, iter, mark);
+ if (priv->loading)
+ return;
+
if (G_UNLIKELY (mark == gtk_text_buffer_get_insert (buffer)))
ide_buffer_emit_cursor_moved (IDE_BUFFER (buffer));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]