fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit 7162ebc29deeaed1837fbe6d4e151e601ee72f3e parent d50465cbfed201a4836a6a947776fe8007557a9e Author: Jul <jul@9o.is> Date: Thu, 31 Jul 2025 05:34:48 -0400 truncate lines to terminal width Diffstat:
| M | src/tty_interface.c | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/tty_interface.c b/src/tty_interface.c @@ -59,6 +59,10 @@ static void draw_match(tty_interface_t *state, const char *choice, int selected) tty_setnowrap(tty); for (size_t i = 0, p = 0; choice[i] != '\0'; i++) { + if (i >= tty_getwidth(state->tty) - 5) { + tty_printf(tty, "..."); + break; + } if (positions[p] == i) { tty_setfg(tty, TTY_COLOR_HIGHLIGHT); p++;