1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

support patched adding

This commit is contained in:
Jesse Duffield
2018-08-07 19:50:35 +10:00
parent b541987007
commit 5a624764a8
3 changed files with 19 additions and 0 deletions

View File

@@ -347,6 +347,10 @@ func openFile(g *gocui.Gui, filename string) (string, error) {
return runCommand(cmdName + " " + cmdTrail)
}
func gitAddPatch(g *gocui.Gui, filename string) {
runSubProcess(g, "git", "add", "-p", filename)
}
func editFile(g *gocui.Gui, filename string) (string, error) {
editor := os.Getenv("VISUAL")
if editor == "" {
@@ -355,6 +359,7 @@ func editFile(g *gocui.Gui, filename string) (string, error) {
if editor == "" {
editor = "vi"
}
runSubProcess(g, editor, filename)
return "", nil
}