Remove autosave option

With the new backup option, the autosave option is no longer useful.
Since it never really worked well in the first place, it has been
removed.

Closes #1420
This commit is contained in:
Zachary Yedidia
2019-12-26 14:35:48 -05:00
parent 7f7ad29671
commit 8570ff9a8c
6 changed files with 30 additions and 34 deletions

View File

@@ -17,7 +17,9 @@ const backupMsg = `A backup was detected for this file. This likely means that m
crashed while editing this file, or another instance of micro is currently
editing this file.
The backup was created on %s.
The backup was created on %s, and the file is
%s
* 'recover' will apply the backup as unsaved changes to the current buffer.
When the buffer is closed, the backup will be removed.
@@ -98,7 +100,7 @@ func (b *Buffer) ApplyBackup(fsize int64) bool {
if err == nil {
defer backup.Close()
t := info.ModTime()
msg := fmt.Sprintf(backupMsg, t.Format("Mon Jan _2 at 15:04, 2006"))
msg := fmt.Sprintf(backupMsg, t.Format("Mon Jan _2 at 15:04, 2006"), util.EscapePath(b.AbsPath))
choice := screen.TermPrompt(msg, []string{"r", "i", "recover", "ignore"}, true)
if choice%2 == 0 {