mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-27 17:30:37 +09:00
save: Restore the screen before overwriteFile() is left (#2967)
...otherwise there is no screen anymore to draw a possible error message.
This commit is contained in:
@@ -79,10 +79,10 @@ func overwriteFile(name string, enc encoding.Encoding, fn func(io.Writer) error,
|
||||
if withSudo {
|
||||
// wait for dd to finish and restart the screen if we used sudo
|
||||
err := cmd.Wait()
|
||||
screen.TempStart(screenb)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
screen.TempStart(screenb)
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user