regression: hangs when a display is too short

Message ID
DKIM signature
Download raw message
- fullscreen terminal with similar font (ie. foot -f monospace)
- python -c "print('a'*$COLUMNS)" | wmenu

- wmenu works fine when items are short enough
- wmenu eats a full CPU core and RAM until OOM-Killed when an item is too long

For context this breaks my himitsu prompt on a FullHD vertical monitor where:
- COLUMNS=180 in `foot -f monospace`
- hiq | cut -b 1-60 | wmenu → works
- hiq | cut -b 1-70 | wmenu → hangs
- hiq | wc -l ⇒ 326
- longest item: 111 characters

$ git bisect good
d8471af8ce633e5a97a5f760de1a987b7998a092 is the first bad commit
commit d8471af8ce633e5a97a5f760de1a987b7998a092
Author: Adnan Maolood <adnan@maolood.com>
Date:   Mon Feb 26 12:40:11 2024 -0500

     Refactor item paging logic

     Determine which items go on which page ahead of time to avoid
     calculating it every time. This also fixes an issue where paging from
     the back doesn't give the same results as paging from the front.

  main.c | 216 +++++++++++++++++++++++++++++++----------------------------------
  1 file changed, 102 insertions(+), 114 deletions(-)
$ git bisect log
# bad: [b8d626ad09a0b38644cc4b07aaefe213529d06cc] add wmenu_run script, similar to dmenu_run script
# good: [3762ed55460b9a3ea2c44daa51804e35eaf0c50d] Version 0.1.6
git bisect start 'origin/HEAD' '0.1.6'
# bad: [2f73c9d21b4bc833fb7d7154657c4024dfd47fd8] Check if selection is not null before dereferencing
git bisect bad 2f73c9d21b4bc833fb7d7154657c4024dfd47fd8
# bad: [597b14105bbc08657d14b92a8e8a07f5f5f399ed] Rename menu_item to item
git bisect bad 597b14105bbc08657d14b92a8e8a07f5f5f399ed
# good: [2084210bfede30e55b9a5194187033d2deda6c1d] Keep track of end of match list
git bisect good 2084210bfede30e55b9a5194187033d2deda6c1d
# bad: [d8471af8ce633e5a97a5f760de1a987b7998a092] Refactor item paging logic
git bisect bad d8471af8ce633e5a97a5f760de1a987b7998a092
# good: [3b5287b3b137a1ff8ea333802b85d11a761bd0fb] Simplify match scrolling
git bisect good 3b5287b3b137a1ff8ea333802b85d11a761bd0fb
# first bad commit: [d8471af8ce633e5a97a5f760de1a987b7998a092] Refactor item paging logic
Message ID
<Zfcp6txZKik-ki84@cloudsdale.the-delta.net.eu.org> (view parent)
DKIM signature
Download raw message
Are you using wmenu 0.1.6? If so, can you see if the issue persists in wmenu
Reply to thread Export thread (mbox)