mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-25 18:55:28 -06:00
@@ -1,4 +1,5 @@
|
||||
# lazygit
|
||||
# lazygit [](https://goreportcard.com/report/github.com/jesseduffield/lazygit)
|
||||
|
||||
A simple terminal UI for git commands, written in Go with the [gocui](https://github.com/jroimartin/gocui "gocui") library.
|
||||
|
||||
Are YOU tired of typing every git command directly into the terminal, but you're too stubborn to use Sourcetree because you'll never forgive Atlassian for making Jira? This is the app for you!
|
||||
|
||||
@@ -103,10 +103,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 {
|
||||
return err
|
||||
}
|
||||
if err := g.SetKeybinding("confirmation", gocui.KeyEsc, gocui.ModNone, wrappedConfirmationFunction(handleNo)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
return g.SetKeybinding("confirmation", gocui.KeyEsc, gocui.ModNone, wrappedConfirmationFunction(handleNo))
|
||||
}
|
||||
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
if err := handleFileSelect(g, v); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return handleFileSelect(g, v)
|
||||
}
|
||||
|
||||
func getSelectedFile(g *gocui.Gui) (GitFile, error) {
|
||||
|
||||
10
gui.go
10
gui.go
@@ -197,10 +197,8 @@ func keybindings(g *gocui.Gui) error {
|
||||
if err := g.SetKeybinding("stash", 'k', gocui.ModNone, handleStashPop); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := g.SetKeybinding("stash", 'd', gocui.ModNone, handleStashDrop); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
return g.SetKeybinding("stash", 'd', gocui.ModNone, handleStashDrop)
|
||||
}
|
||||
|
||||
func layout(g *gocui.Gui) error {
|
||||
@@ -230,10 +228,10 @@ func layout(g *gocui.Gui) error {
|
||||
v.Wrap = true
|
||||
}
|
||||
return nil
|
||||
} else {
|
||||
g.DeleteView("limit")
|
||||
}
|
||||
|
||||
g.DeleteView("limit")
|
||||
|
||||
optionsTop := height - 2
|
||||
// hiding options if there's not enough space
|
||||
if height < 30 {
|
||||
|
||||
Reference in New Issue
Block a user