aisk / pick

create curses based interactive selection list in the terminal
MIT License
721 stars 60 forks source link

Pick options which match the amount of terminal lines will hide the title text when picking options. #85

Closed laundmo closed 1 year ago

laundmo commented 1 year ago

It seems like when he number of pick options given are close to or match the number of options which could be displayed, it doesn't properly show the title text.

Example snippet (should reliably reproduce):

import os
from pick import pick

s = os.get_terminal_size()
options = [str(i) for i in range(s.lines - 1)]
pick(options, "Some\ntitle\nwith\na\nfew\nlinebreaks")

Gif: WindowsTerminal_bFudYuKigh

Tested on: Windows 10 and WSL Ubuntu, both in Windows Terminal