Skip to content

Commit

Permalink
(bugfix): fix flashing on tab change (#43)
Browse files Browse the repository at this point in the history
by not clearing screen on each tab switch

Signed-off-by: everettraven <everettraven@gmail.com>
  • Loading branch information
everettraven committed Dec 8, 2023
1 parent 12fef01 commit 2963178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/charm/models/tabber.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ func (t *Tabber) Update(msg tea.Msg) (*Tabber, tea.Cmd) {
if t.selected > len(t.tabs)-1 {
t.selected = 0
}
return t, tea.ClearScreen
return t, nil
case key.Matches(msg, t.keyMap.TabLeft):
t.selected--
if t.selected < 0 {
t.selected = len(t.tabs) - 1
}
return t, tea.ClearScreen
return t, nil
}
case tea.WindowSizeMsg:
t.width = msg.Width
Expand Down

0 comments on commit 2963178

Please sign in to comment.