diff options
author | stk <stk@ableton.com> | 2023-02-07 09:17:43 +0100 |
---|---|---|
committer | stk <stk@ableton.com> | 2023-02-07 12:09:17 +0100 |
commit | bbaeab68e1f106b5412d85dc2bd8d4aec8a6b258 (patch) | |
tree | 133f24df6dd32570f84dd2d3e47e5d05247a2f44 | |
parent | 946c1dff99513956f6a9f23e0104e564807eaa01 (diff) |
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.
-rw-r--r-- | pkg/gui/whitespace-toggle.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/whitespace-toggle.go b/pkg/gui/whitespace-toggle.go index ad82bc036..b4ee798cc 100644 --- a/pkg/gui/whitespace-toggle.go +++ b/pkg/gui/whitespace-toggle.go @@ -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{}) } |