1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-09-16 09:16:26 +02:00

staging lines and hunks

This commit is contained in:
Jesse Duffield
2018-12-05 19:33:46 +11:00
parent 658e5a9faf
commit c0f9795910
21 changed files with 703 additions and 99 deletions

View File

@@ -57,10 +57,13 @@ func (gui *Gui) handleSwitchToStagingPanel(g *gocui.Gui, v *gocui.View) error {
}
return nil
}
if !file.Tracked || !file.HasUnstagedChanges {
if !file.HasUnstagedChanges {
gui.Log.WithField("staging", "staging").Info("making error panel")
return gui.createErrorPanel(g, gui.Tr.SLocalize("FileStagingRequirements"))
}
gui.switchFocus(g, v, stagingView)
if err := gui.switchFocus(g, v, stagingView); err != nil {
return err
}
return gui.refreshStagingPanel()
}