Skip to content

Commit db5fcf1

Browse files
authored
save: Restore the screen before overwriteFile() is left (zyedidia#2967)
...otherwise there is no screen anymore to draw a possible error message.
1 parent db6d4f5 commit db5fcf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/buffer/save.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ func overwriteFile(name string, enc encoding.Encoding, fn func(io.Writer) error,
7979
if withSudo {
8080
// wait for dd to finish and restart the screen if we used sudo
8181
err := cmd.Wait()
82+
screen.TempStart(screenb)
8283
if err != nil {
8384
return err
8485
}
85-
screen.TempStart(screenb)
8686
}
8787

8888
return

0 commit comments

Comments
 (0)