mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-24 08:52:21 +02:00
Showing modal when no files to commit
This commit is contained in:
parent
843927dd26
commit
787e5d13ed
@ -15,7 +15,7 @@ import (
|
||||
func handleCommitPress(g *gocui.Gui, currentView *gocui.View) error {
|
||||
devLog(stagedFiles(state.GitFiles))
|
||||
if len(stagedFiles(state.GitFiles)) == 0 {
|
||||
return nil
|
||||
return createConfirmationPanel(g, currentView, "Nothing to Commit", "There are no staged files to commit (enter)", nil, nil)
|
||||
}
|
||||
maxX, maxY := g.Size()
|
||||
if v, err := g.SetView("commit", maxX/2-30, maxY/2-1, maxX/2+30, maxY/2+1); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user