From 2907abd3516c5e799b71680ad236e93a0c57bbff Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Fri, 21 Aug 2020 16:46:14 -0400 Subject: [PATCH] Don't show status message in file listing when stashing in pager --- ui/ui.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ui/ui.go b/ui/ui.go index c20a362..19a6eb5 100644 --- a/ui/ui.go +++ b/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) } }