1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00

disallow editing commit file directory

This commit is contained in:
Jesse Duffield 2021-03-31 23:05:16 +11:00
parent 50c169e0a3
commit 82fe4aa6c0

View File

@ -129,6 +129,10 @@ func (gui *Gui) handleEditCommitFile(g *gocui.Gui, v *gocui.View) error {
return nil
}
if node.File == nil {
return gui.createErrorPanel(gui.Tr.ErrCannotEditDirectory)
}
return gui.editFile(node.GetPath())
}