mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
micro: Provide recovery of settings.json & bindings.json
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/zyedidia/micro/v2/internal/util"
|
||||
)
|
||||
|
||||
const backupMsg = `A backup was detected for this file. This likely means that micro
|
||||
const BackupMsg = `A backup was detected for this file. This likely means that micro
|
||||
crashed while editing this file, or another instance of micro is currently
|
||||
editing this file.
|
||||
|
||||
@@ -131,7 +131,7 @@ func (b *Buffer) ApplyBackup(fsize int64) (bool, bool) {
|
||||
if err == nil {
|
||||
defer backup.Close()
|
||||
t := info.ModTime()
|
||||
msg := fmt.Sprintf(backupMsg, t.Format("Mon Jan _2 at 15:04, 2006"), backupfile)
|
||||
msg := fmt.Sprintf(BackupMsg, t.Format("Mon Jan _2 at 15:04, 2006"), backupfile)
|
||||
choice := screen.TermPrompt(msg, []string{"r", "i", "a", "recover", "ignore", "abort"}, true)
|
||||
|
||||
if choice%3 == 0 {
|
||||
|
||||
Reference in New Issue
Block a user