diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-04 23:51:59 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 4fe512ff3a299102c2bd78bc83b8644582127aae (patch) | |
tree | 5a34eacc1c137a8c98624ba29b757c0a717cf694 /pkg/gui/commit_files_panel.go | |
parent | 4197921465a6cb67d5fdd5b63de653493a5ebd41 (diff) |
test
type safe view access
Diffstat (limited to 'pkg/gui/commit_files_panel.go')
-rw-r--r-- | pkg/gui/commit_files_panel.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go index f0223a15e..b0bd16547 100644 --- a/pkg/gui/commit_files_panel.go +++ b/pkg/gui/commit_files_panel.go @@ -45,7 +45,7 @@ func (gui *Gui) handleCommitFileSelect() error { cmd := gui.OSCommand.ExecutableFromString( gui.GitCommand.ShowFileDiffCmdStr(from, to, reverse, node.GetPath(), false), ) - task := gui.createRunPtyTask(cmd) + task := NewRunPtyTask(cmd) return gui.refreshMainViews(refreshMainOpts{ main: &viewUpdateOpts{ @@ -287,7 +287,8 @@ func (gui *Gui) handleToggleCommitFileTreeView() error { } } - if gui.getCommitFilesView().Context == COMMIT_FILES_CONTEXT_KEY { + // TODO: pretty sure this view only ever has this context. Is this if condition necessary? + if gui.Views.CommitFiles.Context == COMMIT_FILES_CONTEXT_KEY { if err := gui.State.Contexts.CommitFiles.HandleRender(); err != nil { return err } |