diff options
author | Davyd McColl <davydm@gmail.com> | 2021-06-14 10:49:36 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-07-01 17:13:14 +1000 |
commit | 35f1ccdb1b62e62acd383b4d22c415cac37badf4 (patch) | |
tree | 3694bea16ee46103c04631357314601cea5b1428 /pkg/gui/staging_panel.go | |
parent | 3dc3174d854b60dcc4da0ecabb0f98adb83ebd53 (diff) |
:recycle: temporarily bypass ignore whitespace for diff view instead of turning the toggle off completely
Diffstat (limited to 'pkg/gui/staging_panel.go')
-rw-r--r-- | pkg/gui/staging_panel.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/gui/staging_panel.go b/pkg/gui/staging_panel.go index 69a005688..1fb9e8989 100644 --- a/pkg/gui/staging_panel.go +++ b/pkg/gui/staging_panel.go @@ -33,13 +33,9 @@ func (gui *Gui) refreshStagingPanel(forceSecondaryFocused bool, selectedLineIdx gui.Views.Secondary.Title = gui.Tr.StagedChanges } - // if we were ignoring whitespace, stop doing that so that - // line-by-line diffs work as expected - _ = gui.setIgnoreWhitespaceFlag(false) - // note for custom diffs, we'll need to send a flag here saying not to use the custom diff - diff := gui.GitCommand.WorktreeFileDiff(file, true, secondaryFocused, gui.State.IgnoreWhitespaceInDiffView) - secondaryDiff := gui.GitCommand.WorktreeFileDiff(file, true, !secondaryFocused, gui.State.IgnoreWhitespaceInDiffView) + diff := gui.GitCommand.WorktreeFileDiff(file, true, secondaryFocused, false) + secondaryDiff := gui.GitCommand.WorktreeFileDiff(file, true, !secondaryFocused, false) // if we have e.g. a deleted file with nothing else to the diff will have only // 4-5 lines in which case we'll swap panels |