diff options
Diffstat (limited to 'e-util/e-html-editor-selection.c')
-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"); |