diff options
author | Davyd McColl <davydm@gmail.com> | 2021-05-28 12:02:19 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-07-01 17:13:13 +1000 |
commit | a9f04d3925bff4ec487a8c622ce84c79ef64ab87 (patch) | |
tree | 58f80bb76136d06e5c5d189f89fd4174c3099d58 /pkg/gui/quitting.go | |
parent | 83834a2c2e50922d58b052b116d50a9fc3903e84 (diff) |
:sparkles: facilitate toggling whitespace in the diff view with a hotkey (c-w by default)
Diffstat (limited to 'pkg/gui/quitting.go')
-rw-r--r-- | pkg/gui/quitting.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/gui/quitting.go b/pkg/gui/quitting.go index 24b92efc2..8abe2e121 100644 --- a/pkg/gui/quitting.go +++ b/pkg/gui/quitting.go @@ -29,6 +29,11 @@ func (gui *Gui) handleQuitWithoutChangingDirectory() error { return gui.quit() } +func (gui *Gui) toggleWhitespaceInDiffView() error { + gui.State.IgnoreWhitespaceInDiffView = !gui.State.IgnoreWhitespaceInDiffView + return gui.refreshFilesAndSubmodules() +} + func (gui *Gui) handleQuit() error { gui.State.RetainOriginalDir = false return gui.quit() |