Skip to content

Commit 7784110

Browse files
chore: use const instead of magic number
1 parent f2ed4fa commit 7784110

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/cliui/select.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
"github.com/coder/serpent"
1515
)
1616

17+
const defaultSelectModelHeight = 7
18+
1719
type SelectOptions struct {
1820
Options []string
1921
// Default will be highlighted first if it's a valid option.
@@ -84,7 +86,7 @@ func Select(inv *serpent.Invocation, opts SelectOptions) (string, error) {
8486
}
8587

8688
if initialModel.height == 0 {
87-
initialModel.height = 7
89+
initialModel.height = defaultSelectModelHeight
8890
}
8991

9092
initialModel.search.Prompt = ""

0 commit comments

Comments
 (0)