diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-29 14:34:17 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-29 18:26:24 +1100 |
commit | 40fbce91ce636eb037c2221946261ce4f4bf4317 (patch) | |
tree | 9c31eb84b24e6e742ef519a4dad89218cca8092e /pkg/gui/gui.go | |
parent | 33d287d2f0c6335559ac75c1b9a4705dfaa9ad7b (diff) |
add new diff mode
WIP
WIP
WIP
WIP
WIP
WIP
WIP
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 62e18f8fd..2fc029b64 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -136,9 +136,8 @@ type tagsPanelState struct { } type commitPanelState struct { - SelectedLine int - SpecificDiffMode bool - LimitCommits bool + SelectedLine int + LimitCommits bool } type reflogCommitPanelState struct { @@ -187,8 +186,8 @@ const ( // if ref is blank we're not diffing anything type DiffState struct { - Ref string - Left bool + Ref string + Reverse bool } type guiState struct { @@ -231,10 +230,12 @@ type guiState struct { } func (gui *Gui) resetState() { - // we carry over the filter path + // we carry over the filter path and diff state prevFilterPath := "" + prevDiff := DiffState{} if gui.State != nil { prevFilterPath = gui.State.FilterPath + prevDiff = gui.State.Diff } gui.State = &guiState{ @@ -266,6 +267,7 @@ func (gui *Gui) resetState() { SideView: nil, Ptmx: nil, FilterPath: prevFilterPath, + Diff: prevDiff, } } |