summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commit_message_panel.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/commit_message_panel.go')
-rw-r--r--pkg/gui/commit_message_panel.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go
index 7ac566b3f..99d649102 100644
--- a/pkg/gui/commit_message_panel.go
+++ b/pkg/gui/commit_message_panel.go
@@ -71,9 +71,17 @@ func (gui *Gui) simpleEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.Mo
v.EditWrite(ch)
}
- v.Subtitle = gui.getBufferLength(v)
+ gui.RenderCommitLength()
}
func (gui *Gui) getBufferLength(view *gocui.View) string {
return " " + strconv.Itoa(strings.Count(view.Buffer(), "")-1) + " "
}
+
+func (gui *Gui) RenderCommitLength() {
+ if !gui.Config.GetUserConfig().GetBool("gui.commitLength.show") {
+ return
+ }
+ v := gui.getCommitMessageView(gui.g)
+ v.Subtitle = gui.getBufferLength(v)
+}