Skip to content

Commit

Permalink
refactor(example): remove magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed Oct 17, 2024
1 parent 690a0e6 commit 2e53b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/table/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
switch msg := msg.(type) {
case tea.WindowSizeMsg:
m.table.SetHeight(msg.Height - 1)
m.table.SetHeight(msg.Height)
case tea.KeyMsg:
switch msg.String() {
case "esc":
Expand Down

2 comments on commit 2e53b6b

@meowgorithm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this change the rendering though? If the -1 is coming from, say, a border or margin I’d query the style for it if possible.

@bashbunni
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's totally fine

Image

Please sign in to comment.