Summary: | misbehaving text wrapping when URL chars are present | ||
---|---|---|---|
Product: | Claws Mail (GTK 2) | Reporter: | Ricardo Mones <mones> |
Component: | UI/Compose Window | Assignee: | users |
Status: | RESOLVED FIXED | ||
Severity: | minor | ||
Priority: | P3 | ||
Version: | 3.9.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
URL: | http://bugs.debian.org/736589 |
Description
Ricardo Mones
2014-01-25 20:59:07 UTC
This happens in function compose_get_line_break_pos(), because after pango_default_break() analyzes the line, the "is_line_break" flag for the '/' and ':' characters (possibly others too) is FALSE. I have no idea why pango would not want to put '/' or ':' at the beginning of line. Following small, dirty hack makes line wrapping before a '/' work fine: diff --git a/src/compose.c b/src/compose.c index 8d8e097ba..4446d75a7 100644 --- a/src/compose.c +++ b/src/compose.c @@ -4259,7 +4259,7 @@ static gboolean compose_get_line_break_pos(GtkTextBuffer *buffer, gunichar wc; gint uri_len; - if (attr->is_line_break && can_break && was_white && !prev_dont_break) + if ((*p == '/' ||attr->is_line_break) && can_break && was_white && !prev_dont_break) pos = i; was_white = attr->is_white; @@ -4280,7 +4280,7 @@ static gboolean compose_get_line_break_pos(GtkTextBuffer *buffer, wc = g_utf8_get_char(p); if (g_unichar_iswide(wc)) { col += 2; - if (prev_dont_break && can_break && attr->is_line_break) + if (prev_dont_break && can_break && (*p == '/' || attr->is_line_break)) pos = i; } else if (*p == '\t') col += 8; Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2019-01-06 11:26:05.237644143 +0100 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=f4f722b814ad7ff6f3fa6cb5e83b330275784d97 Author: Andrej Kacian <ticho@claws-mail.org> Date: Sun Jan 6 11:23:19 2019 +0100 Improve line breaks in compose window Fixes bug #3070: misbehaving text wrapping when URL chars are present |