From 781105c49bf414275b0d16be99d152022ab92f8c Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 27 Mar 2026 14:55:02 +0100 Subject: [PATCH] Scroll to top when showing subcommits Previously, when showing subcommits of a branch or tag, scrolling down, and then going out and entering subcommits again, it would select the first commit but keep the previous scroll position, so that the selection was not visible. Always scroll to the top to fix this. --- pkg/gui/controllers/helpers/sub_commits_helper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/gui/controllers/helpers/sub_commits_helper.go b/pkg/gui/controllers/helpers/sub_commits_helper.go index 080e1b456..fbf100e16 100644 --- a/pkg/gui/controllers/helpers/sub_commits_helper.go +++ b/pkg/gui/controllers/helpers/sub_commits_helper.go @@ -66,6 +66,7 @@ func (self *SubCommitsHelper) ViewSubCommits(opts ViewSubCommitsOpts) error { subCommitsContext.GetView().TitlePrefix = opts.Context.GetView().TitlePrefix self.c.PostRefreshUpdate(self.c.Contexts().SubCommits) + subCommitsContext.FocusLine(true) self.c.Context().Push(self.c.Contexts().SubCommits, types.OnFocusOpts{}) return nil