summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Chen <weichen2000121@gmail.com>2020-01-07 10:03:13 -0800
committerDavid Chen <weichen2000121@gmail.com>2020-01-07 10:03:13 -0800
commite72cab81c1326eddd1d391e509dd66c06b03e57e (patch)
treee38ff6bc844dff4e73372b090cd8bf4dcfc100a7
parent844a2db83af5b23411ee5794033a1b8baeb97af0 (diff)
customizable keybinding for toggleDiffCommit
-rw-r--r--docs/Config.md1
-rw-r--r--pkg/config/app_config.go1
-rw-r--r--pkg/gui/keybindings.go2
3 files changed, 3 insertions, 1 deletions
diff --git a/docs/Config.md b/docs/Config.md
index fd054119f..f4dc1fc92 100644
--- a/docs/Config.md
+++ b/docs/Config.md
@@ -111,6 +111,7 @@ Default path for the config file: `~/.config/jesseduffield/lazygit/config.yml`
cherryPickCopyRange: 'C'
pasteCommits: 'v'
tagCommit: 'T'
+ toggleDiffCommit: 'h'
stash:
popStash: 'g'
commitFiles:
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index abc650a05..5869ed612 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -344,6 +344,7 @@ keybinding:
cherryPickCopyRange: 'C'
pasteCommits: 'v'
tagCommit: 'T'
+ toggleDiffCommit: 'h'
stash:
popStash: 'g'
commitFiles:
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index dade5aa51..2928ed63b 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -723,7 +723,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "commits",
- Key: 'h',
+ Key: gui.getKey("commits.toggleDiffCommit"),
Modifier: gocui.ModNone,
Handler: gui.handleToggleDiffCommit,
Description: gui.Tr.SLocalize("CommitsDiff"),