mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-26 09:00:57 +02:00
remove useless condition
This commit is contained in:
parent
7b7621c18c
commit
684e8b2e80
@ -101,10 +101,8 @@ func setKeyBindings(g *gocui.Gui, handleYes, handleNo func(*gocui.Gui, *gocui.Vi
|
|||||||
if err := g.SetKeybinding("confirmation", gocui.KeyEnter, gocui.ModNone, wrappedConfirmationFunction(handleYes)); err != nil {
|
if err := g.SetKeybinding("confirmation", gocui.KeyEnter, gocui.ModNone, wrappedConfirmationFunction(handleYes)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := g.SetKeybinding("confirmation", gocui.KeyEsc, gocui.ModNone, wrappedConfirmationFunction(handleNo)); err != nil {
|
|
||||||
return err
|
return g.SetKeybinding("confirmation", gocui.KeyEsc, gocui.ModNone, wrappedConfirmationFunction(handleNo))
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createMessagePanel(g *gocui.Gui, currentView *gocui.View, title, prompt string) error {
|
func createMessagePanel(g *gocui.Gui, currentView *gocui.View, title, prompt string) error {
|
||||||
|
@ -59,11 +59,8 @@ func handleFilePress(g *gocui.Gui, v *gocui.View) error {
|
|||||||
if err := refreshFiles(g); err != nil {
|
if err := refreshFiles(g); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := handleFileSelect(g, v); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return handleFileSelect(g, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getSelectedFile(g *gocui.Gui) (GitFile, error) {
|
func getSelectedFile(g *gocui.Gui) (GitFile, error) {
|
||||||
|
6
gui.go
6
gui.go
@ -196,10 +196,8 @@ func keybindings(g *gocui.Gui) error {
|
|||||||
if err := g.SetKeybinding("stash", 'k', gocui.ModNone, handleStashPop); err != nil {
|
if err := g.SetKeybinding("stash", 'k', gocui.ModNone, handleStashPop); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := g.SetKeybinding("stash", 'd', gocui.ModNone, handleStashDrop); err != nil {
|
|
||||||
return err
|
return g.SetKeybinding("stash", 'd', gocui.ModNone, handleStashDrop)
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func layout(g *gocui.Gui) error {
|
func layout(g *gocui.Gui) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user