@@ 10,13 10,8 @@ import (
var win *acme.Win
-func wipe() {
- win.Addr(",")
- win.Write("data", nil)
-}
-
func gitcmd(arg ...string) {
- wipe()
+ win.Clear()
cmd := exec.Command("git", arg...)
r, w, err := os.Pipe()
if err != nil {
@@ 73,10 68,10 @@ func commit() {
cmd.Stdout = w
cmd.Stderr = w
- cmd.Env = append(os.Environ(), "GIT_EDITOR=acme-ed.sh")
+ cmd.Env = append(os.Environ(), "GIT_EDITOR=Git")
err = cmd.Start()
w.Close()
- wipe()
+ win.Clear()
if err != nil {
r.Close()
win.Fprintf("data", "(exec: %s)\n", err)
@@ 100,7 95,9 @@ func giteditor() {
log.Fatal(err)
}
- cwin.Ctl("name " + os.Args[1])
+ if err = cwin.Name(os.Args[1]); err != nil {
+ log.Fatal(err)
+ }
cwin.Ctl("get")
for e := range cwin.EventChan() {