use correct line index when calculating width
This commit is contained in:
parent
925f3e8731
commit
357a40b586
2
dunst.c
2
dunst.c
@ -543,7 +543,7 @@ void draw_win(void)
|
|||||||
notification *n = (notification *) iter->data;
|
notification *n = (notification *) iter->data;
|
||||||
for (int i = 0; i < n->draw_txt_buf.line_count; i++) {
|
for (int i = 0; i < n->draw_txt_buf.line_count; i++) {
|
||||||
char *line =
|
char *line =
|
||||||
draw_txt_get_line(&n->draw_txt_buf, i);
|
draw_txt_get_line(&n->draw_txt_buf, i+1);
|
||||||
assert(line != NULL);
|
assert(line != NULL);
|
||||||
width = MAX(width, textw(dc, line));
|
width = MAX(width, textw(dc, line));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user