aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-editor-selection.c
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-07-15 16:59:08 +0800
committerTomas Popela <tpopela@redhat.com>2014-07-15 17:10:00 +0800
commitbf860b3f99d7588469f16acd10f7758889e11fd1 (patch)
tree215f7675da48658615e4ea7063f3b2152e390bfb /e-util/e-html-editor-selection.c
parent127d946dffef95579d68cb195ec0b06f6032fcd9 (diff)
downloadgsoc2013-evolution-bf860b3f99d7588469f16acd10f7758889e11fd1.tar
gsoc2013-evolution-bf860b3f99d7588469f16acd10f7758889e11fd1.tar.gz
gsoc2013-evolution-bf860b3f99d7588469f16acd10f7758889e11fd1.tar.bz2
gsoc2013-evolution-bf860b3f99d7588469f16acd10f7758889e11fd1.tar.lz
gsoc2013-evolution-bf860b3f99d7588469f16acd10f7758889e11fd1.tar.xz
gsoc2013-evolution-bf860b3f99d7588469f16acd10f7758889e11fd1.tar.zst
gsoc2013-evolution-bf860b3f99d7588469f16acd10f7758889e11fd1.zip
Bug 732608 - Composer paste issues
We have to treat the pasting into the normal and the quoted content separately. We have to also correctly process the new lines on the beginning/end of the pasted content to avoid their lose.
Diffstat (limited to 'e-util/e-html-editor-selection.c')
-rw-r--r--e-util/e-html-editor-selection.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 01141c7df4..f790f12d8b 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -4134,9 +4134,13 @@ e_html_editor_selection_insert_html (EHTMLEditorSelection *selection,
g_return_if_fail (view != NULL);
command = E_HTML_EDITOR_VIEW_COMMAND_INSERT_HTML;
- if (e_html_editor_view_get_html_mode (view))
+ if (e_html_editor_view_get_html_mode (view)) {
e_html_editor_view_exec_command (view, command, html_text);
- else
+ e_html_editor_view_check_magic_links (view, FALSE);
+ e_html_editor_view_force_spell_check (view);
+
+ e_html_editor_selection_scroll_to_caret (selection);
+ } else
e_html_editor_view_convert_and_insert_html_to_plain_text (
view, html_text);
@@ -5238,12 +5242,12 @@ wrap_lines (EHTMLEditorSelection *selection,
} else {
webkit_dom_node_normalize (paragraph_clone);
- /* Replace paragraph with wrapped one */
- webkit_dom_node_replace_child (
- webkit_dom_node_get_parent_node (paragraph),
- paragraph_clone,
- paragraph,
- NULL);
+ node = webkit_dom_node_get_parent_node (paragraph);
+ if (node) {
+ /* Replace paragraph with wrapped one */
+ webkit_dom_node_replace_child (
+ node, paragraph_clone, paragraph, NULL);
+ }
return WEBKIT_DOM_ELEMENT (paragraph_clone);
}