summaryrefslogtreecommitdiffstats
path: root/pkg/gui/keybindings.go
diff options
context:
space:
mode:
authorDavyd McColl <davydm@gmail.com>2021-05-28 12:02:19 +0200
committerJesse Duffield <jessedduffield@gmail.com>2021-07-01 17:13:13 +1000
commita9f04d3925bff4ec487a8c622ce84c79ef64ab87 (patch)
tree58f80bb76136d06e5c5d189f89fd4174c3099d58 /pkg/gui/keybindings.go
parent83834a2c2e50922d58b052b116d50a9fc3903e84 (diff)
:sparkles: facilitate toggling whitespace in the diff view with a hotkey (c-w by default)
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r--pkg/gui/keybindings.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 169a1be24..dbcb0b8fe 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -1720,6 +1720,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
OpensMenu: true,
},
{
+ ViewName: "files",
+ Contexts: []string{string(FILES_CONTEXT_KEY)},
+ Key: gui.getKey(config.Universal.ToggleWhitespaceInDiffView),
+ Handler: gui.toggleWhitespaceInDiffView,
+ Description: gui.Tr.ToggleWhitespaceInDiffView,
+ },
+ {
ViewName: "extras",
Key: gocui.MouseWheelUp,
Handler: gui.scrollUpExtra,