mirror of
git://git.suckless.org/dmenu
synced 2026-09-23 00:16:30 +01:00
fix crash with long prompt and pressing the end key in horizontal mode
Reproducable with: printf 'a\nb\n' | ./dmenu -p "$(printf 'x%.0s' $(seq 1 400))" and then pressing the end key. Reported by: jb19357 <jb19357@protonmail.com> Who used Claude to write a report.
This commit is contained in:
parent
7175c4880b
commit
5453bb65d9
2
dmenu.c
2
dmenu.c
@ -171,7 +171,7 @@ drawmenu(void)
|
|||||||
/* draw vertical list */
|
/* draw vertical list */
|
||||||
for (item = curr; item != next; item = item->right)
|
for (item = curr; item != next; item = item->right)
|
||||||
drawitem(item, x, y += bh, mw - x);
|
drawitem(item, x, y += bh, mw - x);
|
||||||
} else if (matches) {
|
} else if (matches && curr) {
|
||||||
/* draw horizontal list */
|
/* draw horizontal list */
|
||||||
x += inputw;
|
x += inputw;
|
||||||
w = TEXTW("<");
|
w = TEXTW("<");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user