junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
61.81k stars 2.35k forks source link

"panic: runtime error" if tty is 1 line high #3889

Closed sturob closed 1 week ago

sturob commented 1 week ago

Checklist

Output of fzf --version

0.53.0 (brew)

OS

Shell

Problem / Steps to reproduce

  1. Use tmux (or similar) to set the active TTY to 1 line high - tmux resize-pane -y 1
  2. Run fzf
  3. Result: fzf exits with "panic: runtime error: index out of range [1] with length 1"

See attachment for full error message: 20240621-fzf-macos-1-line-bug.txt

I believe this is a regression from 0.52.1 but I haven't downgraded to test that.

junegunn commented 1 week ago

Thanks for the report. Fixed on master.