[evolution] Bug 745946 - Adding emoticon at the beginning of line adds a line break too
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 745946 - Adding emoticon at the beginning of line adds a line break too
- Date: Tue, 10 Mar 2015 08:25:26 +0000 (UTC)
commit 0f1416f52fc8b3e0f3e8433191c94713cd6d97e0
Author: Tomas Popela <tpopela redhat com>
Date: Tue Mar 10 09:23:00 2015 +0100
Bug 745946 - Adding emoticon at the beginning of line adds a line break too
When saving the selection start marker on the end of block always put
it before the BR element if presented.
e-util/e-html-editor-selection.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index f4c7797..4522d3d 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -6123,10 +6123,20 @@ e_html_editor_selection_save (EHTMLEditorSelection *selection)
NULL);
goto insert_end_marker;
} else if (!webkit_dom_node_get_next_sibling (container)) {
- marker_node = webkit_dom_node_append_child (
- container,
- WEBKIT_DOM_NODE (start_marker),
- NULL);
+ WebKitDOMNode *tmp;
+
+ tmp = webkit_dom_node_get_last_child (container);
+ if (tmp && WEBKIT_DOM_IS_HTMLBR_ELEMENT (tmp))
+ marker_node = webkit_dom_node_insert_before (
+ container,
+ WEBKIT_DOM_NODE (start_marker),
+ tmp,
+ NULL);
+ else
+ marker_node = webkit_dom_node_append_child (
+ container,
+ WEBKIT_DOM_NODE (start_marker),
+ NULL);
goto insert_end_marker;
} else {
if (webkit_dom_node_get_first_child (container)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]