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

update options

This commit is contained in:
Jesse Duffield 2018-07-22 12:58:09 +10:00
parent 5dbe262d2d
commit 001ea1002d
3 changed files with 18 additions and 15 deletions

View File

@ -108,15 +108,15 @@ func handleIgnoreFile(g *gocui.Gui, v *gocui.View) error {
func renderfilesOptions(g *gocui.Gui, gitFile *GitFile) error {
optionsMap := map[string]string{
"tab": "next panel",
"S": "stash files",
"c": "commit changes",
"o": "open",
"s": "open in sublime",
"v": "open in vscode",
"i": "ignore",
"d": "delete",
"space": "toggle staged",
"← → ↑ ↓": "navigate",
"S": "stash files",
"c": "commit changes",
"o": "open",
"s": "sublime",
"v": "vscode",
"i": "ignore",
"d": "delete",
"space": "toggle staged",
}
if state.HasMergeConflicts {
optionsMap["a"] = "abort merge"

5
gui.go
View File

@ -67,7 +67,10 @@ func handleRefresh(g *gocui.Gui, v *gocui.View) error {
}
func keybindings(g *gocui.Gui) error {
if err := g.SetKeybinding("", gocui.KeyTab, gocui.ModNone, nextView); err != nil {
if err := g.SetKeybinding("", gocui.KeyArrowRight, gocui.ModNone, nextView); err != nil {
return err
}
if err := g.SetKeybinding("", gocui.KeyArrowLeft, gocui.ModNone, previousView); err != nil {
return err
}
if err := g.SetKeybinding("", 'q', gocui.ModNone, quit); err != nil {

View File

@ -236,11 +236,11 @@ func switchToMerging(g *gocui.Gui) error {
func renderMergeOptions(g *gocui.Gui) error {
return renderOptionsMap(g, map[string]string{
"up/down": "pick hunk",
"left/right": "previous/next commit",
"space": "pick hunk",
"b": "pick both hunks",
"z": "undo",
"↑ ↓": "select hunk",
"← →": "navigate conflicts",
"space": "pick hunk",
"b": "pick both hunks",
"z": "undo",
})
}