mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Re-render the main view without re-focusing the panel beneath it
Toggling whitespace needs the panel beneath to render its diff again, which is what HandleRenderToMain is for; HandleFocus does that and also everything else that belongs to a panel gaining the focus, which this panel already has or, when the focus is in the main view, does not want. Re-selecting its current item is harmless, but re-deriving its highlight as a focused panel's is not: the selection turns bright while the user is somewhere else. Changing the context size and switching diff renderers already ask for a re-render this way. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e8009599e0
commit
d1707d5dd2
|
|
@ -27,6 +27,6 @@ func (self *ToggleWhitespaceAction) Call() error {
|
|||
|
||||
self.c.UserConfig().Git.IgnoreWhitespaceInDiffView = !self.c.UserConfig().Git.IgnoreWhitespaceInDiffView
|
||||
|
||||
self.c.Context().CurrentSide().HandleFocus(types.OnFocusOpts{})
|
||||
self.c.Context().CurrentSide().HandleRenderToMain()
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ var ToggleWhitespaceKeepsUnfocusedSelectionDimmed = NewIntegrationTest(NewIntegr
|
|||
Press(keys.Universal.ToggleWhitespaceInDiffView)
|
||||
|
||||
t.Views().Files().
|
||||
/* EXPECTED:
|
||||
SelectionIsInactive()
|
||||
ACTUAL: */
|
||||
SelectionIsActive()
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue