1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

Better redrawing after toggling "ignore whitespace"

There's no need for refreshing anything; all that's needed is to re-focus the
selected list item. This way it will also work in other panels, which we are
about to add in the next commit.
This commit is contained in:
stk 2023-02-07 09:17:43 +01:00
parent 946c1dff99
commit bbaeab68e1

View File

@ -1,5 +1,9 @@
package gui
import (
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
func (gui *Gui) toggleWhitespaceInDiffView() error {
gui.IgnoreWhitespaceInDiffView = !gui.IgnoreWhitespaceInDiffView
@ -9,5 +13,5 @@ func (gui *Gui) toggleWhitespaceInDiffView() error {
}
gui.c.Toast(toastMessage)
return gui.refreshFilesAndSubmodules()
return gui.currentSideListContext().HandleFocus(types.OnFocusOpts{})
}