diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-24 22:07:30 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-26 18:00:46 +1100 |
commit | 13b90ac37f40baa648c25fab6d299ae0fa59118b (patch) | |
tree | 61dd23273a4b32c3c8d191759cc0ce3ae9d7c08a /pkg/gui/context/commit_files_context.go | |
parent | e039429885996f1335430a856b846d8dc6279325 (diff) |
support viewing commits of reflog entry and show better view title
Diffstat (limited to 'pkg/gui/context/commit_files_context.go')
-rw-r--r-- | pkg/gui/context/commit_files_context.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/gui/context/commit_files_context.go b/pkg/gui/context/commit_files_context.go index 0576be102..5ad7144dc 100644 --- a/pkg/gui/context/commit_files_context.go +++ b/pkg/gui/context/commit_files_context.go @@ -1,10 +1,13 @@ package context import ( + "fmt" + "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/filetree" "github.com/jesseduffield/lazygit/pkg/gui/types" + "github.com/jesseduffield/lazygit/pkg/utils" ) type CommitFilesContext struct { @@ -37,6 +40,7 @@ func NewCommitFilesContext( Key: COMMIT_FILES_CONTEXT_KEY, Kind: types.SIDE_CONTEXT, Focusable: true, + Transient: true, }), ContextCallbackOpts{ OnFocus: onFocus, @@ -59,3 +63,7 @@ func (self *CommitFilesContext) GetSelectedItemId() string { return item.ID() } + +func (self *CommitFilesContext) Title() string { + return fmt.Sprintf(self.c.Tr.CommitFilesDynamicTitle, utils.TruncateWithEllipsis(self.GetRefName(), 50)) +} |