aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-09-05 19:35:53 +0800
committerTomas Popela <tpopela@redhat.com>2014-09-05 19:51:43 +0800
commitdbb776e1c50db403ea246323aed8310307faf6ce (patch)
tree36574e122c03ee240190158a7f7ea46a57636c25
parent04b05bf605cdad727ad17ed632a37a6635c79f19 (diff)
downloadgsoc2013-evolution-dbb776e1c50db403ea246323aed8310307faf6ce.tar
gsoc2013-evolution-dbb776e1c50db403ea246323aed8310307faf6ce.tar.gz
gsoc2013-evolution-dbb776e1c50db403ea246323aed8310307faf6ce.tar.bz2
gsoc2013-evolution-dbb776e1c50db403ea246323aed8310307faf6ce.tar.lz
gsoc2013-evolution-dbb776e1c50db403ea246323aed8310307faf6ce.tar.xz
gsoc2013-evolution-dbb776e1c50db403ea246323aed8310307faf6ce.tar.zst
gsoc2013-evolution-dbb776e1c50db403ea246323aed8310307faf6ce.zip
EHTMLEditorSelection - Disable the selection-changed callback when restoring the caret position
-rw-r--r--e-util/e-html-editor-selection.c5
1 files changed, 5 insertions, 0 deletions
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