Fix sucmd option

Fixes #854
This commit is contained in:
Zachary Yedidia
2017-10-03 10:48:07 -04:00
parent 299416062f
commit c7334eb3b7

View File

@@ -431,7 +431,7 @@ func (b *Buffer) SaveAsWithSudo(filename string) error {
screen = nil
// Set up everything for the command
cmd := exec.Command(b.Settings["sucmd"].(string), "tee", filename)
cmd := exec.Command(globalSettings["sucmd"].(string), "tee", filename)
cmd.Stdin = bytes.NewBufferString(b.SaveString(b.Settings["fileformat"] == "dos"))
// This is a trap for Ctrl-C so that it doesn't kill micro