wordwrap one char earlier
This commit is contained in:
parent
62e92c7625
commit
f0c9b71b97
2
dunst.c
2
dunst.c
@ -669,7 +669,7 @@ GSList *do_word_wrap(char *text, int max_width)
|
|||||||
begin = ++end;
|
begin = ++end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (word_wrap && max_width > 0 && textnw(dc, begin, (end - begin)) > max_width) {
|
if (word_wrap && max_width > 0 && textnw(dc, begin, (end - begin) + 1) > max_width) {
|
||||||
/* find previous space */
|
/* find previous space */
|
||||||
char *space = end;
|
char *space = end;
|
||||||
while (space > begin && !isspace(*space))
|
while (space > begin && !isspace(*space))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user