[evolution/wip/webkit-composer: 932/966] EEditorSelection: When selection ends on the end of the body we have to append the marker
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 932/966] EEditorSelection: When selection ends on the end of the body we have to append the marker
- Date: Wed, 23 Apr 2014 11:11:47 +0000 (UTC)
commit eac728ac01af7235ebed95a6e6174fbc84ab5031
Author: Tomas Popela <tpopela redhat com>
Date: Tue Mar 25 16:08:52 2014 +0100
EEditorSelection: When selection ends on the end of the body we have to append the marker
e-util/e-editor-selection.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index e07dfa1..87ed89d 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -4936,10 +4936,18 @@ e_editor_selection_save (EEditorSelection *selection)
}
marker_node = WEBKIT_DOM_NODE (marker);
- parent_node = webkit_dom_node_get_parent_node (split_node);
- webkit_dom_node_insert_before (
- parent_node, marker_node, split_node, NULL);
+ if (split_node) {
+ parent_node = webkit_dom_node_get_parent_node (split_node);
+
+ webkit_dom_node_insert_before (
+ parent_node, marker_node, split_node, NULL);
+ } else {
+ webkit_dom_node_append_child (
+ webkit_dom_node_get_parent_node (container),
+ marker_node,
+ NULL);
+ }
}
g_object_unref (editor_widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]