diff options
author | Tomas Popela <tpopela@redhat.com> | 2014-07-22 21:30:28 +0800 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2014-07-22 21:30:28 +0800 |
commit | 86474af102cf9398b713220130bbeb1a5efef1ab (patch) | |
tree | 1b2ea5ea970c975988e5a941de54e79c6ad736a7 /e-util | |
parent | 1e50111cf877d283df29954524f0ab23b535dac0 (diff) | |
download | gsoc2013-evolution-86474af102cf9398b713220130bbeb1a5efef1ab.tar gsoc2013-evolution-86474af102cf9398b713220130bbeb1a5efef1ab.tar.gz gsoc2013-evolution-86474af102cf9398b713220130bbeb1a5efef1ab.tar.bz2 gsoc2013-evolution-86474af102cf9398b713220130bbeb1a5efef1ab.tar.lz gsoc2013-evolution-86474af102cf9398b713220130bbeb1a5efef1ab.tar.xz gsoc2013-evolution-86474af102cf9398b713220130bbeb1a5efef1ab.tar.zst gsoc2013-evolution-86474af102cf9398b713220130bbeb1a5efef1ab.zip |
EHTMLEditorView - Select the right node for processing after the new line was inserted into the quoted content
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-html-editor-view.c | 7 |
1 files 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)); |