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



commit 483a0a28e5a0818094e9b3409b7aa156e56175ca
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Jun 10 09:20:09 2014 +0200

    Bug 731416 - [webkit-composer] Busy-loop when replying to an email
    
    Don't try to wrap words that are longer than defined word wrap length,
    otherwise we will end in busy loop.

 e-util/e-html-editor-selection.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index c109063..131fc86 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -4566,7 +4566,10 @@ find_where_to_break_line (WebKitDOMNode *node,
        if (g_unichar_isspace (g_utf8_get_char (position))) {
                ret_val = max_len + 1;
        } else {
-               if (last_space < max_len) {
+               if (last_space == 0) {
+                       /* If word is longer than word_wrap_length, we cannot wrap it */
+                       ret_val = length;
+               } else if (last_space < max_len) {
                        ret_val = last_space;
                } else {
                        if (length > word_wrap_length)


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