[evolution] EHTMLEditorSelection - Not possible to remove smiley if selected



commit 8178ad2187f50e0523537e0a8af20f7f5b992838
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Mar 13 08:37:26 2015 +0100

    EHTMLEditorSelection - Not possible to remove smiley if selected

 e-util/e-html-editor-selection.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 1335ef6..9554b5e 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -6628,12 +6628,14 @@ e_html_editor_selection_save (EHTMLEditorSelection *selection)
                WebKitDOMNode *node;
 
                node = webkit_dom_node_get_parent_node (parent_node);
-               marker_node = webkit_dom_node_insert_before (
-                       webkit_dom_node_get_parent_node (node),
-                       WEBKIT_DOM_NODE (start_marker),
-                       webkit_dom_node_get_next_sibling (node),
-                       NULL);
-               goto insert_end_marker;
+               if (offset == 0) {
+                       marker_node = webkit_dom_node_insert_before (
+                               webkit_dom_node_get_parent_node (node),
+                               WEBKIT_DOM_NODE (start_marker),
+                               node,
+                               NULL);
+                       goto insert_end_marker;
+               }
        }
 
        if (WEBKIT_DOM_IS_TEXT (container)) {


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