[evolution] Bug 731416 - [webkit-composer] Busy-loop when replying to an email



commit 42da9384e4f3792917ffc5aca64ec71f2ef07922
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Jun 30 14:24:11 2014 +0200

    Bug 731416 - [webkit-composer] Busy-loop when replying to an email
    
    When wrapping lines with really long words (more that is defined in Composer
    settings) the maximal length for wrap could be less than zero. For
    proper functionality we have to set it to the right value.

 e-util/e-html-editor-selection.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 2ddeef1..938a06d 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -4917,10 +4917,15 @@ wrap_lines (EHTMLEditorSelection *selection,
 
                /* wrap until we have something */
                while ((length_left + len) > word_wrap_length) {
+                       gint max_length;
+
+                       max_length = word_wrap_length - len;
+                       if (max_length < 0)
+                               max_length = word_wrap_length;
                        /* Find where we can line-break the node so that it
                         * effectively fills the rest of current row */
                        offset = find_where_to_break_line (
-                               node, word_wrap_length - len, word_wrap_length);
+                               node, max_length, word_wrap_length);
 
                        element = webkit_dom_document_create_element (document, "BR", NULL);
                        element_add_class (element, "-x-evo-wrap-br");


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