summaryrefslogtreecommitdiffstats
path: root/pkg/gui/reflog_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-18 22:02:35 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commitf5b22d94d939b0fc1aff433686e891e0a7507950 (patch)
tree9812c4c7f3855d7e3fe973dacf5533ef04463c3d /pkg/gui/reflog_panel.go
parent3c87ff4eff46449d5e697e954b3bdf01d2c76f19 (diff)
WIP
Diffstat (limited to 'pkg/gui/reflog_panel.go')
-rw-r--r--pkg/gui/reflog_panel.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/gui/reflog_panel.go b/pkg/gui/reflog_panel.go
index c1cc118de..1fc7abbd0 100644
--- a/pkg/gui/reflog_panel.go
+++ b/pkg/gui/reflog_panel.go
@@ -23,24 +23,24 @@ func (gui *Gui) handleReflogCommitSelect() error {
return gui.renderDiff()
}
- refreshOpts := refreshMainOpts{
- main: &viewUpdateOpts{
- title: "Reflog Entry",
- },
- }
-
commit := gui.getSelectedReflogCommit()
+ var task updateTask
if commit == nil {
- refreshOpts.main.task = func() error { return gui.newStringTask("main", "No reflog history") }
+ task = gui.createRenderStringTask("No reflog history")
} else {
cmd := gui.OSCommand.ExecutableFromString(
gui.GitCommand.ShowCmdStr(commit.Sha, gui.State.FilterPath),
)
- refreshOpts.main.task = func() error { return gui.newPtyTask("main", cmd) }
+ task = gui.createRunPtyTask(cmd)
}
- return gui.refreshMain(refreshOpts)
+ return gui.refreshMain(refreshMainOpts{
+ main: &viewUpdateOpts{
+ title: "Reflog Entry",
+ task: task,
+ },
+ })
}
// the reflogs panel is the only panel where we cache data, in that we only