[gnome-text-editor] document: short-circuit cursor-moved when loading
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] document: short-circuit cursor-moved when loading
- Date: Mon, 1 Aug 2022 19:32:33 +0000 (UTC)
commit 6451bb1b3c9043e8f6e0424071e5ca2b07dc2d13
Author: Christian Hergert <chergert redhat com>
Date: Mon Aug 1 12:31:43 2022 -0700
document: short-circuit cursor-moved when loading
This doesn't need to happen here, we can deal with it (and already do)
once the document has finished loading.
Related #444
src/editor-document.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/editor-document.c b/src/editor-document.c
index 8daead0..5a23ca0 100644
--- a/src/editor-document.c
+++ b/src/editor-document.c
@@ -525,6 +525,9 @@ on_cursor_moved_cb (EditorDocument *self)
GtkTextMark *mark;
GtkTextIter iter;
+ if (_editor_document_get_loading (self))
+ return;
+
mark = gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (self));
gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (self), &iter, mark);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]