diff options
author | kobutomo <n.tomoro13@gmail.com> | 2020-10-06 09:52:10 +0900 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-06 21:55:01 +1100 |
commit | 3e15ae32112970e39de68ef0d5bf96fa5e2bcd40 (patch) | |
tree | d5cf71e0ad19cb37b73854e59d7b397ba368ff90 /pkg/gui/files_panel.go | |
parent | 26cb209af24de5f0fae3ba30a0905400fe2f55a8 (diff) |
Add error panel.
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index a689de6c9..353c55c1b 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -247,9 +247,12 @@ func (gui *Gui) handleStageAll(g *gocui.Gui, v *gocui.View) error { func (gui *Gui) handleIgnoreFile(g *gocui.Gui, v *gocui.View) error { file := gui.getSelectedFile() - if file == nil || file.Name == ".gitignore" { + if file == nil { return nil } + if file.Name == ".gitignore" { + return gui.createErrorPanel("Cannot ignore .gitignore") + } if file.Tracked { return gui.ask(askOpts{ |