[evolution/gnome-3-26] Bug 788829 - Busy loop when wrapping Reply quoted text



commit bbf39b4e99a27b3c6c35d738c87e82f5a0d5d700
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 11 20:05:07 2017 +0200

    Bug 788829 - Busy loop when wrapping Reply quoted text

 .../web-extension/e-editor-dom-functions.c         |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index a632cd6..9656ff5 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -14249,11 +14249,19 @@ wrap_lines (EEditorPage *editor_page,
                                                remove_node (nd);
                                        g_free (nd_content);
 
-                                       if (no_sibling)
+                                       if (no_sibling) {
                                                node = NULL;
-                                       else
+                                       } else {
+                                               nd = node;
+
                                                node = webkit_dom_node_get_next_sibling (
                                                        WEBKIT_DOM_NODE (element));
+
+                                               if (nd == node)
+                                                       node = webkit_dom_node_get_next_sibling (node);
+                                               if (nd == node)
+                                                       node = NULL;
+                                       }
                                } else {
                                        webkit_dom_node_append_child (
                                                webkit_dom_node_get_parent_node (node),


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