Fix save with sudo auto-detection and sudo/doas message

This commit is contained in:
Zachary Yedidia
2021-08-20 13:55:59 -04:00
parent 2eeeb0f2e4
commit dceddcfd83
2 changed files with 14 additions and 8 deletions

View File

@@ -256,7 +256,7 @@ func NewBufferFromFileAtLoc(path string, btype BufType, cursorLoc Loc) (*Buffer,
}
if readonly && prompt != nil {
prompt.Message("Warning: file is readonly - sudo will be attempted when saving")
prompt.Message(fmt.Sprintf("Warning: file is readonly - %s will be attempted when saving", config.GlobalSettings["sucmd"].(string)))
// buf.SetOptionNative("readonly", true)
}