summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-23 23:22:10 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-03-23 23:25:00 +1100
commit5d460e1e5e002ae3f4deb6b75e77b5916d672cc5 (patch)
tree2f7351bd9dcf8ade31ee23cc815df07c1e504243
parent3d3e0be7bd0cd7d8115762011046659941e4b585 (diff)
add tab keybindingsv0.17.4
-rw-r--r--docs/keybindings/Keybindings_en.md10
-rw-r--r--docs/keybindings/Keybindings_nl.md10
-rw-r--r--docs/keybindings/Keybindings_pl.md10
-rw-r--r--pkg/gui/keybindings.go45
-rw-r--r--pkg/i18n/english.go6
5 files changed, 64 insertions, 17 deletions
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md
index 0027db2ec..e34393510 100644
--- a/docs/keybindings/Keybindings_en.md
+++ b/docs/keybindings/Keybindings_en.md
@@ -16,6 +16,13 @@
<kbd>:</kbd>: execute custom command
</pre>
+## Branches Panel
+
+<pre>
+ <kbd>]</kbd>: next tab
+ <kbd>[</kbd>: previous tab
+</pre>
+
## Branches Panel (Branches Tab)
<pre>
@@ -83,6 +90,8 @@
## Commits Panel
<pre>
+ <kbd>]</kbd>: next tab
+ <kbd>[</kbd>: previous tab
<kbd>/</kbd>: start search
</pre>
@@ -110,6 +119,7 @@
<kbd>space</kbd>: checkout commit
<kbd>i</kbd>: select commit to diff with another commit
<kbd>T</kbd>: tag commit
+ <kbd>ctrl+r</kbd>: reset cherry-picked (copied) commits selection
</pre>
## Commits Panel (Reflog Tab)
diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md
index fd8ed8a3e..50c396a01 100644
--- a/docs/keybindings/Keybindings_nl.md
+++ b/docs/keybindings/Keybindings_nl.md
@@ -16,6 +16,13 @@
<kbd>:</kbd>: voor aangepast commando uit
</pre>
+## Branches Panel
+
+<pre>
+ <kbd>]</kbd>: next tab
+ <kbd>[</kbd>: previous tab
+</pre>
+
## Branches Panel (Branches Tab)
<pre>
@@ -83,6 +90,8 @@
## Commits Panel
<pre>
+ <kbd>]</kbd>: next tab
+ <kbd>[</kbd>: previous tab
<kbd>/</kbd>: start search
</pre>
@@ -110,6 +119,7 @@
<kbd>space</kbd>: checkout commit
<kbd>i</kbd>: select commit to diff with another commit
<kbd>T</kbd>: tag commit
+ <kbd>ctrl+r</kbd>: reset cherry-picked (copied) commits selection
</pre>
## Commits Panel (Reflog Tab)
diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md
index 1b4fecd0e..d4bde494b 100644
--- a/docs/keybindings/Keybindings_pl.md
+++ b/docs/keybindings/Keybindings_pl.md
@@ -16,6 +16,13 @@
<kbd>:</kbd>: execute custom command
</pre>
+## Gałęzie Panel
+
+<pre>
+ <kbd>]</kbd>: next tab
+ <kbd>[</kbd>: previous tab
+</pre>
+
## Gałęzie Panel (Branches Tab)
<pre>
@@ -83,6 +90,8 @@
## Commity Panel
<pre>
+ <kbd>]</kbd>: next tab
+ <kbd>[</kbd>: previous tab
<kbd>/</kbd>: start search
</pre>
@@ -110,6 +119,7 @@
<kbd>space</kbd>: checkout commit
<kbd>i</kbd>: select commit to diff with another commit
<kbd>T</kbd>: tag commit
+ <kbd>ctrl+r</kbd>: reset cherry-picked (copied) commits selection
</pre>
## Commity Panel (Reflog Tab)
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 501f1faea..320d10190 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -618,16 +618,18 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Description: gui.Tr.SLocalize("viewResetOptions"),
},
{
- ViewName: "branches",
- Key: gui.getKey("universal.nextTab"),
- Modifier: gocui.ModNone,
- Handler: gui.handleNextBranchesTab,
+ ViewName: "branches",
+ Key: gui.getKey("universal.nextTab"),
+ Modifier: gocui.ModNone,
+ Handler: gui.handleNextBranchesTab,
+ Description: gui.Tr.SLocalize("nextTab"),
},
{
- ViewName: "branches",
- Key: gui.getKey("universal.prevTab"),
- Modifier: gocui.ModNone,
- Handler: gui.handlePrevBranchesTab,
+ ViewName: "branches",
+ Key: gui.getKey("universal.prevTab"),
+ Modifier: gocui.ModNone,
+ Handler: gui.handlePrevBranchesTab,
+ Description: gui.Tr.SLocalize("prevTab"),
},
{
ViewName: "branches",
@@ -654,16 +656,18 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Description: gui.Tr.SLocalize("fetchRemote"),
},
{
- ViewName: "commits",
- Key: gui.getKey("universal.nextTab"),
- Modifier: gocui.ModNone,
- Handler: gui.handleNextCommitsTab,
+ ViewName: "commits",
+ Key: gui.getKey("universal.nextTab"),
+ Modifier: gocui.ModNone,
+ Handler: gui.handleNextCommitsTab,
+ Description: gui.Tr.SLocalize("nextTab"),
},
{
- ViewName: "commits",
- Key: gui.getKey("universal.prevTab"),
- Modifier: gocui.ModNone,
- Handler: gui.handlePrevCommitsTab,
+ ViewName: "commits",
+ Key: gui.getKey("universal.prevTab"),
+ Modifier: gocui.ModNone,
+ Handler: gui.handlePrevCommitsTab,
+ Description: gui.Tr.SLocalize("prevTab"),
},
{
ViewName: "commits",
@@ -1474,7 +1478,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
// we need a specific keybinding for the commits panel beacuse it usually lazyloads commits
if listView.viewName != "commits" {
- bindings = append(bindings, &Binding{ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.startSearch"), Modifier: gocui.ModNone, Handler: gui.handleOpenSearch, Description: gui.Tr.SLocalize("startSearch")})
+ bindings = append(bindings, &Binding{
+ ViewName: listView.viewName,
+ Contexts: []string{listView.context},
+ Key: gui.getKey("universal.startSearch"),
+ Modifier: gocui.ModNone,
+ Handler: gui.handleOpenSearch,
+ Description: gui.Tr.SLocalize("startSearch"),
+ })
}
}
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index 13f617264..d2d473f9a 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -1035,6 +1035,12 @@ func addEnglish(i18nObject *i18n.Bundle) error {
}, &i18n.Message{
ID: "resetCherryPick",
Other: "reset cherry-picked (copied) commits selection",
+ }, &i18n.Message{
+ ID: "nextTab",
+ Other: "next tab",
+ }, &i18n.Message{
+ ID: "prevTab",
+ Other: "previous tab",
},
)
}