Use upstream updated zyedidia tcell

This commit is contained in:
Zachary Yedidia
2019-12-31 20:15:45 -05:00
parent 6632ab0a77
commit 0301e3539e
20 changed files with 23 additions and 32 deletions

View File

@@ -3,7 +3,6 @@ package buffer
import (
"fmt"
"io"
"log"
"os"
"time"
@@ -37,7 +36,6 @@ func (b *Buffer) Backup(checkTime bool) error {
if checkTime {
sub := time.Now().Sub(b.lastbackup)
if sub < time.Duration(backupTime)*time.Millisecond {
log.Println("Backup event but not enough time has passed", sub)
return nil
}
}
@@ -47,13 +45,10 @@ func (b *Buffer) Backup(checkTime bool) error {
backupdir := config.ConfigDir + "/backups/"
if _, err := os.Stat(backupdir); os.IsNotExist(err) {
os.Mkdir(backupdir, os.ModePerm)
log.Println("Creating backup dir")
}
name := backupdir + util.EscapePath(b.AbsPath)
log.Println("Backing up to", name)
err := overwriteFile(name, encoding.Nop, func(file io.Writer) (e error) {
if len(b.lines) == 0 {
return

View File

@@ -2,7 +2,7 @@ package buffer
import (
"github.com/zyedidia/micro/internal/config"
"github.com/gdamore/tcell"
"github.com/zyedidia/tcell"
)
type MsgType int