1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

improve remove file logic

This commit is contained in:
Jesse Duffield
2018-08-18 20:14:44 +10:00
parent 0174375562
commit 08666889f4
3 changed files with 16 additions and 4 deletions

View File

@@ -128,7 +128,7 @@ func (gui *Gui) handleFileRemove(g *gocui.Gui, v *gocui.View) error {
)
return gui.createConfirmationPanel(g, v, strings.Title(deleteVerb)+" file", message, func(g *gocui.Gui, v *gocui.View) error {
if err := gui.GitCommand.RemoveFile(file); err != nil {
panic(err)
return err
}
return gui.refreshFiles(g)
}, nil)