mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-10 20:05:50 +02:00
Fix truncation of branches when scrolling branches panel to the left (#4483)
- **PR Description** Truncation of long branch names didn't take the horizontal scroll position into account; when scrolling the panel to the left using `H`, the long names were truncated way before the right edge of the view.
This commit is contained in:
commit
89ba3f2b1a
2 changed files with 4 additions and 1 deletions
|
@ -30,7 +30,7 @@ func NewBranchesContext(c *ContextCommon) *BranchesContext {
|
|||
c.State().GetItemOperation,
|
||||
c.State().GetRepoState().GetScreenMode() != types.SCREEN_NORMAL,
|
||||
c.Modes().Diffing.Ref,
|
||||
c.Views().Branches.InnerWidth(),
|
||||
c.Views().Branches.InnerWidth()+c.Views().Branches.OriginX(),
|
||||
c.Tr,
|
||||
c.UserConfig(),
|
||||
c.Model().Worktrees,
|
||||
|
|
|
@ -74,6 +74,9 @@ func (self *ListController) scrollHorizontal(scrollFunc func()) error {
|
|||
scrollFunc()
|
||||
|
||||
self.context.HandleFocus(types.OnFocusOpts{})
|
||||
if self.context.NeedsRerenderOnWidthChange() == types.NEEDS_RERENDER_ON_WIDTH_CHANGE_WHEN_WIDTH_CHANGES {
|
||||
self.context.HandleRender()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue