diff options
-rw-r--r-- | docs/Config.md | 1 | ||||
-rw-r--r-- | pkg/config/user_config.go | 2 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 6 | ||||
-rw-r--r-- | pkg/i18n/english.go | 2 |
4 files changed, 11 insertions, 0 deletions
diff --git a/docs/Config.md b/docs/Config.md index 020b4724a..b2cb562c0 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -154,6 +154,7 @@ keybinding: appendNewline: '<a-enter>' extrasMenu: '@' toggleWhitespaceInDiffView: '<c-w>' + increaseContextInDiffView: '}' status: checkForUpdate: 'u' recentRepos: '<enter>' diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 09895f66d..5f747f85c 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -177,6 +177,7 @@ type KeybindingUniversalConfig struct { AppendNewline string `yaml:"appendNewline"` ExtrasMenu string `yaml:"extrasMenu"` ToggleWhitespaceInDiffView string `yaml:"toggleWhitespaceInDiffView"` + IncreaseContextInDiffView string `yaml:"increaseContextInDiffView"` } type KeybindingStatusConfig struct { @@ -438,6 +439,7 @@ func GetDefaultConfig() *UserConfig { AppendNewline: "<a-enter>", ExtrasMenu: "@", ToggleWhitespaceInDiffView: "<c-w>", + IncreaseContextInDiffView: "}", }, Status: KeybindingStatusConfig{ CheckForUpdate: "u", diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 232708b9b..65bd5df42 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -1771,6 +1771,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Description: gui.Tr.ToggleWhitespaceInDiffView, }, { + ViewName: "", + Key: gui.getKey(config.Universal.IncreaseContextInDiffView), + Handler: gui.IncreaseContextInDiffView, + Description: gui.Tr.IncreaseContextInDiffView, + }, + { ViewName: "extras", Key: gocui.MouseWheelUp, Handler: gui.scrollUpExtra, diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index da218ac74..eacec4e21 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -427,6 +427,7 @@ type TranslationSet struct { ToggleWhitespaceInDiffView string IgnoringWhitespaceInDiffView string ShowingWhitespaceInDiffView string + IncreaseContextInDiffView string CreatePullRequestOptions string LcCreatePullRequestOptions string LcDefaultBranch string @@ -967,6 +968,7 @@ func englishTranslationSet() TranslationSet { ToggleWhitespaceInDiffView: "Toggle whether or not whitespace changes are shown in the diff view", 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", CreatePullRequest: "Create pull request", CreatePullRequestOptions: "Create pull request options", LcCreatePullRequestOptions: "create pull request options", |