diff options
author | Sean <seand52@gmail.com> | 2023-01-21 11:38:14 +0000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-04-30 12:17:34 +1000 |
commit | 49da7b482d4f3012814e4100a556ecfad3f0742d (patch) | |
tree | 4d403b4301e0918c57ba292b11d6ce9256e8843a /pkg/config/user_config.go | |
parent | 826128a8e03fb50f7287029ebac93c85712faecb (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/config/user_config.go')
-rw-r--r-- | pkg/config/user_config.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index fb0638e43..fb36bb7ea 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -165,6 +165,7 @@ type KeybindingUniversalConfig struct { Select string `yaml:"select"` GoInto string `yaml:"goInto"` Confirm string `yaml:"confirm"` + ConfirmInEditor string `yaml:"confirmInEditor"` Remove string `yaml:"remove"` New string `yaml:"new"` Edit string `yaml:"edit"` @@ -193,7 +194,6 @@ type KeybindingUniversalConfig struct { CopyToClipboard string `yaml:"copyToClipboard"` OpenRecentRepos string `yaml:"openRecentRepos"` SubmitEditorText string `yaml:"submitEditorText"` - AppendNewline string `yaml:"appendNewline"` ExtrasMenu string `yaml:"extrasMenu"` ToggleWhitespaceInDiffView string `yaml:"toggleWhitespaceInDiffView"` IncreaseContextInDiffView string `yaml:"increaseContextInDiffView"` @@ -492,6 +492,7 @@ func GetDefaultConfig() *UserConfig { Select: "<space>", GoInto: "<enter>", Confirm: "<enter>", + ConfirmInEditor: "<a-enter>", Remove: "d", New: "n", Edit: "e", @@ -520,7 +521,6 @@ func GetDefaultConfig() *UserConfig { DiffingMenuAlt: "<c-e>", CopyToClipboard: "<c-o>", SubmitEditorText: "<enter>", - AppendNewline: "<a-enter>", ExtrasMenu: "@", ToggleWhitespaceInDiffView: "<c-w>", IncreaseContextInDiffView: "}", |