diff options
author | Tomas Popela <tpopela@redhat.com> | 2014-06-30 20:24:11 +0800 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2014-06-30 20:36:24 +0800 |
commit | 42da9384e4f3792917ffc5aca64ec71f2ef07922 (patch) | |
tree | bfc5d8a10671ef6301e74e77b317444299cdf787 | |
parent | 246232233d44f37271e7a9d71d4303545bafa646 (diff) | |
download | gsoc2013-evolution-42da9384e4f3792917ffc5aca64ec71f2ef07922.tar gsoc2013-evolution-42da9384e4f3792917ffc5aca64ec71f2ef07922.tar.gz gsoc2013-evolution-42da9384e4f3792917ffc5aca64ec71f2ef07922.tar.bz2 gsoc2013-evolution-42da9384e4f3792917ffc5aca64ec71f2ef07922.tar.lz gsoc2013-evolution-42da9384e4f3792917ffc5aca64ec71f2ef07922.tar.xz gsoc2013-evolution-42da9384e4f3792917ffc5aca64ec71f2ef07922.tar.zst gsoc2013-evolution-42da9384e4f3792917ffc5aca64ec71f2ef07922.zip |
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.
-rw-r--r-- | 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 2ddeef1047..938a06dc87 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"); |