[evolution] Bug 740475 - Quoted reply editing issues



commit 6cb6ccda604e15df308459e4486ae4438822894e
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Dec 15 11:22:51 2014 +0100

    Bug 740475 - Quoted reply editing issues
    
    Check if won't add two BR elements in row to avoid unnecessary empty
    line.

 e-util/e-html-editor-view.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 9b6742c..eb3e61d 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -2216,8 +2216,12 @@ body_keyup_event_cb (WebKitDOMElement *element,
                                        WEBKIT_DOM_NODE (selection_start_marker)),
                                NULL);
 
-                       webkit_dom_node_append_child (
-                               node, WEBKIT_DOM_NODE (br_element), NULL);
+                       if (!WEBKIT_DOM_IS_HTMLBR_ELEMENT (webkit_dom_node_get_last_child (node)))
+                               webkit_dom_node_append_child (
+                                       node, WEBKIT_DOM_NODE (br_element), NULL);
+                       else
+                               remove_node (WEBKIT_DOM_NODE (br_element));
+
                        remove_node (parent);
                }
  restore:


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