From 787e5d13edf027043a902b27cf46e6843b1c7013 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 26 May 2018 17:18:00 +1000 Subject: [PATCH] Showing modal when no files to commit --- commit_panel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commit_panel.go b/commit_panel.go index 5de77c760..f53f93408 100644 --- a/commit_panel.go +++ b/commit_panel.go @@ -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 {