1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-05 15:15:49 +02:00

handle no-file error gracefully when trying to stage

This commit is contained in:
Jesse Duffield 2018-08-05 18:34:50 +10:00
parent 8aacd6915b
commit 01540866bf

View File

@ -40,6 +40,9 @@ func stageSelectedFile(g *gocui.Gui) error {
func handleFilePress(g *gocui.Gui, v *gocui.View) error {
file, err := getSelectedFile(g)
if err != nil {
if err == ErrNoFiles {
return nil
}
return err
}