[evolution/gnome-3-18] Bug 757658 - Still broken deletion/undo of quotes in mail composer



commit da7cc51b6fd15ebfc0eae0ff74da58f0eae2b72a
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Nov 9 13:39:33 2015 +0100

    Bug 757658 - Still broken deletion/undo of quotes in mail composer
    
    The undo/redo stack was corrupted after the last backspace press in the step 6
    when the caret was restored to a wrong position as we failed to recognize the
    current caret position correctly.

 e-util/e-html-editor-view.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index fa46d7e..1622539 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -5019,7 +5019,7 @@ delete_character_from_quoted_line_start (EHTMLEditorView *view,
        gboolean success = FALSE;
        WebKitDOMDocument *document;
        WebKitDOMElement *element;
-       WebKitDOMNode *node, *beginning;
+       WebKitDOMNode *node, *beginning, *next_sibling;
 
        selection = e_html_editor_view_get_selection (view);
 
@@ -5041,7 +5041,8 @@ delete_character_from_quoted_line_start (EHTMLEditorView *view,
        node = webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (element));
 
        /* We have to be on the end of line. */
-       if (webkit_dom_node_get_next_sibling (node))
+       next_sibling = webkit_dom_node_get_next_sibling (node);
+       if (next_sibling && (!WEBKIT_DOM_IS_HTMLBR_ELEMENT (next_sibling) || webkit_dom_node_get_next_sibling 
(next_sibling)))
                goto out;
 
        /* Before the caret is just text. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]