summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorSean <seand52@gmail.com>2023-01-21 11:38:14 +0000
committerJesse Duffield <jessedduffield@gmail.com>2023-04-30 13:19:53 +1000
commit9d68b287db57b49eddf4b2b81ca1acd2e16aa5aa (patch)
treed286af9a7cfa27348fb5034ee01a1e16a699057b /pkg/gui/gui.go
parenta5c72d056ddbd639db3597ffb19a60e0cbae1826 (diff)
Split commit message panel into commit summary and commit description panel
When we use the one panel for the entire commit message, its tricky to have a keybinding both for adding a newline and submitting. By having two panels: one for the summary line and one for the description, we allow for 'enter' to submit the message when done from the summary panel, and 'enter' to add a newline when done from the description panel. Alt-enter, for those who can use that key combo, also works for submitting the message from the description panel. For those who can't use that key combo, and don't want to remap the keybinding, they can hit tab to go back to the summary panel and then 'enter' to submit the message. We have some awkwardness in that both contexts (i.e. panels) need to appear and disappear in tandem and we don't have a great way of handling that concept, so we just push both contexts one after the other, and likewise remove both contexts when we escape.
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 49dbd556c..6b42da4fc 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -217,10 +217,6 @@ type GuiRepoState struct {
// back in sync with the repo state
ViewsSetup bool
- // we store a commit message in this field if we've escaped the commit message
- // panel without committing or if our commit failed
- savedCommitMessage string
-
ScreenMode types.WindowMaximisation
CurrentPopupOpts *types.CreatePopupPanelOpts