jesseduffield.lazygit/pkg/gui/layout_test.go
Stefan Haller 1fb5f87d05 Lay out the filter row of a menu that filters as you type
The row is reserved for as long as such a menu is open, even while it is
still hidden, so that it can appear without moving the menu. That costs
two rows of the popup, which is why the screen has to be a little taller
before a menu is worth showing at all.

The prompt in front of the input field is dropped when the row gets too
narrow to type in, and the keybindings menu says what '@' does when it
still fits.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 20:41:22 +02:00

15 lines
327 B
Go

package gui
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMinimumScreenHeight(t *testing.T) {
assert.Equal(t, 9, minimumScreenHeight(5, false))
assert.Equal(t, 12, minimumScreenHeight(8, false))
assert.Equal(t, 11, minimumScreenHeight(5, true))
assert.Equal(t, 12, minimumScreenHeight(8, true))
}