Open seeseemelk opened 1 month ago
I've been looking into this a little: the select option hard-codes that it should scroll down a single line when pressing the down arrow key. Changing this to, say, 2, helps a little, but does not actually fix it.
The Viewport class itself also seems to assume that lines don't wrap. It generates a slice of visible lines based on the viewport height and scroll position, but this slice does not take wrapping into account.
Likely, if the Viewport is modified so it correctly considers wrapping, the Select will probably just work
I agree this is likely viewport
not calculating height properly
@bashbunni It is, I independently also discovered it, there is an open issue at bubbles https://github.com/charmbracelet/bubbles/issues/644
Describe the bug When showing a Select menu, the last option disappears when at least two options have to wrap
To Reproduce Steps to reproduce the behavior:
Expected behavior All possible options should stay visible.
Screenshots No wrapping, all options are visible:
One option wraps, all options are visible:
Two options wrap, the last option disappears:
Desktop (please complete the following information):
Linux dalek 6.11.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Oct 2024 20:11:06 +0000 x86_64 GNU/Linux