mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 14:14:17 +00:00
Load selected item from stash into the pager
This commit is contained in:
parent
8ba5c1fa0d
commit
c622816a43
1 changed files with 2 additions and 1 deletions
|
@ -148,8 +148,9 @@ func stashUpdate(msg boba.Msg, m stashModel) (stashModel, boba.Cmd) {
|
|||
|
||||
case "enter":
|
||||
m.state = stashStateLoadingItem
|
||||
indexToLoad := m.paginator.Page*m.paginator.PerPage + m.index
|
||||
return m, boba.Batch(
|
||||
loadStashedItem(m.cc, m.documents[m.index].ID),
|
||||
loadStashedItem(m.cc, m.documents[indexToLoad].ID),
|
||||
spinner.Tick(m.spinner),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue