mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-21 15:44:17 +02:00
Don't show status message in file listing when stashing in pager
This commit is contained in:
parent
e01dc95d7d
commit
2907abd351
1 changed files with 5 additions and 8 deletions
13
ui/ui.go
13
ui/ui.go
|
|
@ -335,15 +335,12 @@ func update(msg tea.Msg, mdl tea.Model) (tea.Model, tea.Cmd) {
|
|||
return m, cmd
|
||||
|
||||
case stashSuccessMsg:
|
||||
// Something was stashed. Update the stash listing. We're caching this
|
||||
// here, rather than in the stash update function, because stashing
|
||||
// may have occurred in the pager.
|
||||
// Something was stashed. Update the stash listing but don't run an
|
||||
// actual update on the stash since we don't want to trigger the status
|
||||
// message and generally don't want any other effects.
|
||||
if m.state == stateShowDocument {
|
||||
newStashModel, cmd := stashUpdate(msg, m.stash)
|
||||
m.stash = newStashModel
|
||||
if cmd != nil {
|
||||
cmds = append(cmds, cmd)
|
||||
}
|
||||
md := markdown(msg)
|
||||
m.stash.addMarkdowns(&md)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue