1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

add new diff mode

WIP

WIP

WIP

WIP

WIP

WIP

WIP
This commit is contained in:
Jesse Duffield
2020-03-29 14:34:17 +11:00
parent 33d287d2f0
commit 40fbce91ce
38 changed files with 465 additions and 136 deletions

View File

@ -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,
}
}