[Users] [Bug 3070] misbehaving text wrapping when URL chars are present
noreply at thewildbeast.co.uk
noreply at thewildbeast.co.uk
Fri Jan 4 22:36:08 CET 2019
https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3070
--- Comment #1 from Andrej Kacian <andrej at kacian.sk> ---
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;
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Users
mailing list