1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

Add alternatives for scroll actions to context map

This commit is contained in:
Suhas Karanth 2019-05-07 12:25:30 +05:30 committed by Jesse Duffield
parent 97f060d38d
commit e38d9d5f22
5 changed files with 9 additions and 7 deletions

View File

@ -98,8 +98,8 @@
## Main (Normal)
<pre>
<kbd>PgDn</kbd>: scroll down
<kbd>PgUp</kbd>: scroll up
<kbd>PgDn</kbd>: scroll down (fn+up)
<kbd>PgUp</kbd>: scroll up (fn+down)
</pre>
## Main (Staging)

View File

@ -98,8 +98,8 @@
## Hoofd (Normaal)
<pre>
<kbd>PgDn</kbd>: scroll omlaag
<kbd>PgUp</kbd>: scroll omhoog
<kbd>PgDn</kbd>: scroll omlaag (fn+up)
<kbd>PgUp</kbd>: scroll omhoog (fn+down)
</pre>
## Hoofd (Stage Lines/Hunks)

View File

@ -98,8 +98,8 @@
## Main (Normal)
<pre>
<kbd>PgDn</kbd>: scroll down
<kbd>PgUp</kbd>: scroll up
<kbd>PgDn</kbd>: scroll down (fn+up)
<kbd>PgUp</kbd>: scroll up (fn+down)
</pre>
## Main (Zatwierdzanie)

View File

@ -576,12 +576,14 @@ func (gui *Gui) GetContextMap() map[string]map[string][]*Binding {
Modifier: gocui.ModNone,
Handler: gui.scrollDownMain,
Description: gui.Tr.SLocalize("ScrollDown"),
Alternative: "fn+up",
}, {
ViewName: "main",
Key: gocui.MouseWheelUp,
Modifier: gocui.ModNone,
Handler: gui.scrollUpMain,
Description: gui.Tr.SLocalize("ScrollUp"),
Alternative: "fn+down",
},
},
"staging": {

View File

@ -99,7 +99,7 @@ func getBindingSections(mApp *app.App) []*bindingSection {
}
func addBinding(title string, bindingSections []*bindingSection, binding *gui.Binding) []*bindingSection {
if binding.Description == "" {
if binding.Description == "" && binding.Alternative == "" {
return bindingSections
}