on main help sign in
fix(tui): completions: don't export variable
849572dAyman Bagabas
internal/tui/components/completions/completions.go+2−2
@@ -56,7 +56,7 @@ type completionsCmp struct {
56 query string // The current filter query
56 query string // The current filter query
57}
57}
58
58
59−const MaxCompletionsWidth = 80 // Maximum width for the completions popup
59+const maxCompletionsWidth = 80 // Maximum width for the completions popup
60
60
61func New() Completions {
61func New() Completions {
62 completionsKeyMap := DefaultKeyMap()
62 completionsKeyMap := DefaultKeyMap()
@@ -96,7 +96,7 @@ func (c *completionsCmp) Init() tea.Cmd {
96func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
96func (c *completionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
97 switch msg := msg.(type) {
97 switch msg := msg.(type) {
98 case tea.WindowSizeMsg:
98 case tea.WindowSizeMsg:
99− c.width = min(msg.Width-c.x, MaxCompletionsWidth)
99+ c.width = min(msg.Width-c.x, maxCompletionsWidth)
100 c.height = min(msg.Height-c.y, 15)
100 c.height = min(msg.Height-c.y, 15)
101 return c, nil
101 return c, nil
102 case tea.KeyPressMsg:
102 case tea.KeyPressMsg: