From dbb776e1c50db403ea246323aed8310307faf6ce Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Fri, 5 Sep 2014 13:35:53 +0200 Subject: EHTMLEditorSelection - Disable the selection-changed callback when restoring the caret position --- e-util/e-html-editor-selection.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c index d2b4121900..017eb324f0 100644 --- a/e-util/e-html-editor-selection.c +++ b/e-util/e-html-editor-selection.c @@ -4911,6 +4911,8 @@ e_html_editor_selection_restore_caret_position (EHTMLEditorSelection *selection) document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (view)); g_object_unref (view); + e_html_editor_selection_block_selection_changed (selection); + element = webkit_dom_document_get_element_by_id ( document, "-x-evo-caret-position"); fix_after_quoting = element_has_class (element, "-x-evo-caret-quoting"); @@ -4936,6 +4938,7 @@ e_html_editor_selection_restore_caret_position (EHTMLEditorSelection *selection) WEBKIT_DOM_NODE (element)); if (!WEBKIT_DOM_IS_ELEMENT (next_sibling)) { e_html_editor_selection_clear_caret_position_marker (selection); + e_html_editor_selection_unblock_selection_changed (selection); return; } @@ -4982,6 +4985,8 @@ e_html_editor_selection_restore_caret_position (EHTMLEditorSelection *selection) window_selection, "move", "forward", "character"); } } + + e_html_editor_selection_unblock_selection_changed (selection); } static gint -- cgit v1.2.3