Skip to content

Commit

Permalink
fix: always scroll to top
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Jan 22, 2021
1 parent 98733aa commit 7b2331a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/ui/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func (m taskListModel) Update(msg tea.Msg) (taskListModel, tea.Cmd) {

var cmd tea.Cmd
m.viewport.SetContent(taskList(m.tasks))
m.viewport.GotoTop()
m.viewport, cmd = m.viewport.Update(msg)
cmds = append(cmds, cmd)
return m, tea.Batch(cmds...)
Expand Down

0 comments on commit 7b2331a

Please sign in to comment.