From 86474af102cf9398b713220130bbeb1a5efef1ab Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Tue, 22 Jul 2014 15:30:28 +0200 Subject: EHTMLEditorView - Select the right node for processing after the new line was inserted into the quoted content --- e-util/e-html-editor-view.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c index 480d6812fa..2029c865d6 100644 --- a/e-util/e-html-editor-view.c +++ b/e-util/e-html-editor-view.c @@ -545,10 +545,13 @@ insert_new_line_into_citation (EHTMLEditorView *view, e_html_editor_selection_get_word_wrap_length (selection); WebKitDOMNode *node; - citation_level = get_citation_level (next_sibling, FALSE); + node = webkit_dom_node_get_first_child (next_sibling); + while (node && is_citation_node (node)) + node = webkit_dom_node_get_first_child (node); + + citation_level = get_citation_level (node, FALSE); length = word_wrap_length - 2 * citation_level; - node = webkit_dom_node_get_first_child (next_sibling); /* Rewrap and requote first block after the newly inserted line */ if (node && WEBKIT_DOM_IS_ELEMENT (node)) { remove_quoting_from_element (WEBKIT_DOM_ELEMENT (node)); -- cgit v1.2.3