[evolution] EHTMLEditorView - List item is deleted when enter is pressed on the end of it



commit 6d32553dd45c43871d11ba96190e1a8f2ef36a50
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Feb 19 07:41:54 2016 +0100

    EHTMLEditorView - List item is deleted when enter is pressed on the end of it
    
    Regression after commit 6c09c26.

 e-util/e-html-editor-view.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 2abf9c2..f99ea04 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -5435,8 +5435,6 @@ selection_is_in_empty_list_item (WebKitDOMNode *selection_start_marker)
        gchar *text;
        WebKitDOMNode *sibling;
 
-       sibling = webkit_dom_node_get_previous_sibling (WEBKIT_DOM_NODE (selection_start_marker));
-
        /* Selection needs to be collapsed. */
        sibling = webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (selection_start_marker));
        if (!e_html_editor_node_is_selection_position_node (sibling))
@@ -5450,8 +5448,7 @@ selection_is_in_empty_list_item (WebKitDOMNode *selection_start_marker)
        if (sibling && webkit_dom_node_get_next_sibling (sibling))
                return FALSE;
 
-       if (!sibling)
-               return TRUE;
+       sibling = webkit_dom_node_get_previous_sibling (WEBKIT_DOM_NODE (selection_start_marker));
 
        /* Only text node with the zero width space character is allowed. */
        if (!WEBKIT_DOM_IS_TEXT (sibling))


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