IngoMeyer441 / simple-term-menu

A Python package which creates simple interactive menus on the command line.
MIT License
492 stars 43 forks source link

Multi-line items are buggy #87

Open johannes-braunias opened 8 months ago

johannes-braunias commented 8 months ago

I set up a menu with multi-line entires and there are some bugs.

import simple_term_menu
terminal_menu = simple_term_menu.TerminalMenu(['Entry 1\n    Line 1\nLine 2\nLine 3 and a very loooooooooooooooooooooooooooooooooooooooooong text', 'Entry 2\n    Line 1\nLine 2\nLine3 with an even loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger text, which seems to be cut before the end.'], multi_select=False, multi_select_cursor_brackets_style=('fg_black',), multi_select_cursor_style=('fg_black', 'bold'))
terminal_menu.show()
IngoMeyer441 commented 7 months ago

Sorry for my late reply. Currently, simple-term-menu simply assumes that all menu entries are one-liners. Therefore, long texts are cut to keep every entry on one line. I tag your issue as enhancement request, since it would definitely be reasonable to allow multi-line strings.