From 483a0a28e5a0818094e9b3409b7aa156e56175ca Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Tue, 10 Jun 2014 09:20:09 +0200 Subject: 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 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c index c109063f41..131fc86ead 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) -- cgit v1.2.3