summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/Config.md1
-rw-r--r--pkg/config/user_config.go2
-rw-r--r--pkg/gui/keybindings.go6
-rw-r--r--pkg/i18n/english.go2
4 files changed, 11 insertions, 0 deletions
diff --git a/docs/Config.md b/docs/Config.md
index b2cb562c0..43976784f 100644
--- a/docs/Config.md
+++ b/docs/Config.md
@@ -155,6 +155,7 @@ keybinding:
extrasMenu: '@'
toggleWhitespaceInDiffView: '<c-w>'
increaseContextInDiffView: '}'
+ decreaseContextInDiffView: '{'
status:
checkForUpdate: 'u'
recentRepos: '<enter>'
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go
index 5f747f85c..14038c9ae 100644
--- a/pkg/config/user_config.go
+++ b/pkg/config/user_config.go
@@ -178,6 +178,7 @@ type KeybindingUniversalConfig struct {
ExtrasMenu string `yaml:"extrasMenu"`
ToggleWhitespaceInDiffView string `yaml:"toggleWhitespaceInDiffView"`
IncreaseContextInDiffView string `yaml:"increaseContextInDiffView"`
+ DecreaseContextInDiffView string `yaml:"decreaseContextInDiffView"`
}
type KeybindingStatusConfig struct {
@@ -440,6 +441,7 @@ func GetDefaultConfig() *UserConfig {
ExtrasMenu: "@",
ToggleWhitespaceInDiffView: "<c-w>",
IncreaseContextInDiffView: "}",
+ DecreaseContextInDiffView: "{",
},
Status: KeybindingStatusConfig{
CheckForUpdate: "u",
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 65bd5df42..d9bf2dd69 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -1777,6 +1777,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Description: gui.Tr.IncreaseContextInDiffView,
},
{
+ ViewName: "",
+ Key: gui.getKey(config.Universal.DecreaseContextInDiffView),
+ Handler: gui.DecreaseContextInDiffView,
+ Description: gui.Tr.DecreaseContextInDiffView,
+ },
+ {
ViewName: "extras",
Key: gocui.MouseWheelUp,
Handler: gui.scrollUpExtra,
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index eacec4e21..7cd85daeb 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -428,6 +428,7 @@ type TranslationSet struct {
IgnoringWhitespaceInDiffView string
ShowingWhitespaceInDiffView string
IncreaseContextInDiffView string
+ DecreaseContextInDiffView string
CreatePullRequestOptions string
LcCreatePullRequestOptions string
LcDefaultBranch string
@@ -969,6 +970,7 @@ func englishTranslationSet() TranslationSet {
IgnoringWhitespaceInDiffView: "Whitespace will be ignored in the diff view",
ShowingWhitespaceInDiffView: "Whitespace will be shown in the diff view",
IncreaseContextInDiffView: "Increase the size of the context shown around changes in the diff view",
+ DecreaseContextInDiffView: "Decrease the size of the context shown around changes in the diff view",
CreatePullRequest: "Create pull request",
CreatePullRequestOptions: "Create pull request options",
LcCreatePullRequestOptions: "create pull request options",