diff --git a/cmd/micro/micro.go b/cmd/micro/micro.go index 4bc638b4..d1c59136 100644 --- a/cmd/micro/micro.go +++ b/cmd/micro/micro.go @@ -7,7 +7,7 @@ import ( "os" "sort" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" "github.com/go-errors/errors" isatty "github.com/mattn/go-isatty" "github.com/zyedidia/micro/internal/action" diff --git a/go.mod b/go.mod index bb5e1dd5..52dbdd19 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/flynn/json5 v0.0.0-20160717195620-7620272ed633 github.com/gdamore/tcell v1.3.0 github.com/go-errors/errors v1.0.1 - github.com/lucasb-eyer/go-colorful v1.0.3 // indirect github.com/mattn/go-isatty v0.0.11 github.com/mattn/go-runewidth v0.0.7 github.com/mitchellh/go-homedir v1.1.0 @@ -16,7 +15,7 @@ require ( github.com/zyedidia/glob v0.0.0-20170209203856-dd4023a66dc3 github.com/zyedidia/poller v0.0.0-20170616160828-ab09682913b7 // indirect github.com/zyedidia/pty v2.0.0+incompatible // indirect - github.com/zyedidia/tcell v0.0.0-20191228235154-5b9bbc0d56c7 + github.com/zyedidia/tcell v0.0.0-20200101010555-3d6f590fde0b github.com/zyedidia/terminal v0.0.0-20180726154117-533c623e2415 golang.org/x/text v0.3.2 gopkg.in/yaml.v2 v2.2.7 diff --git a/go.sum b/go.sum index bac7a50b..09d40ed7 100644 --- a/go.sum +++ b/go.sum @@ -55,6 +55,8 @@ github.com/zyedidia/tcell v0.0.0-20191227234059-2c574ec1b972 h1:tqsPH3tvIF9LQMWQ github.com/zyedidia/tcell v0.0.0-20191227234059-2c574ec1b972/go.mod h1:yXgdp23+aW8OMENYVBvpKoeiBtjaVWJ9HhpPDu6LBfM= github.com/zyedidia/tcell v0.0.0-20191228235154-5b9bbc0d56c7 h1:Qw5255OIirY741L/Kt5KLitfzfhpk29x+A193zByTS0= github.com/zyedidia/tcell v0.0.0-20191228235154-5b9bbc0d56c7/go.mod h1:yXgdp23+aW8OMENYVBvpKoeiBtjaVWJ9HhpPDu6LBfM= +github.com/zyedidia/tcell v0.0.0-20200101010555-3d6f590fde0b h1:WOYC0HHwRKNvDcvVbm5QXfjD+uoBvnqqSxRdjlsXIq0= +github.com/zyedidia/tcell v0.0.0-20200101010555-3d6f590fde0b/go.mod h1:b7qO+6WpCTSDPZ3ru7R2FNZeEtcNpo+X8m+5Py0/l64= github.com/zyedidia/terminal v0.0.0-20180726154117-533c623e2415 h1:752dTQ5OatJ9M5ULK2+9lor+nzyZz+LYDo3WGngg3Rc= github.com/zyedidia/terminal v0.0.0-20180726154117-533c623e2415/go.mod h1:8leT8G0Cm8NoJHdrrKHyR9MirWoF4YW7pZh06B6H+1E= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/internal/action/actions.go b/internal/action/actions.go index 6e871cd9..925c97e8 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -14,7 +14,7 @@ import ( "github.com/zyedidia/micro/internal/shell" "github.com/zyedidia/micro/internal/util" "github.com/zyedidia/micro/pkg/shellwords" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) // ScrollUp is not an action diff --git a/internal/action/bindings.go b/internal/action/bindings.go index b2f2b02c..5ffc2eef 100644 --- a/internal/action/bindings.go +++ b/internal/action/bindings.go @@ -9,7 +9,7 @@ import ( "unicode" "github.com/flynn/json5" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" "github.com/zyedidia/micro/internal/config" "github.com/zyedidia/micro/internal/screen" ) diff --git a/internal/action/bufpane.go b/internal/action/bufpane.go index 138cd3f2..3da74e49 100644 --- a/internal/action/bufpane.go +++ b/internal/action/bufpane.go @@ -6,7 +6,7 @@ import ( luar "layeh.com/gopher-luar" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" lua "github.com/yuin/gopher-lua" "github.com/zyedidia/micro/internal/buffer" "github.com/zyedidia/micro/internal/config" @@ -266,9 +266,9 @@ func (h *BufPane) HandleEvent(event tcell.Event) { // esc: e.EscSeq(), // } // h.DoKeyEvent(re) - // case *tcell.EventPaste: - // h.paste(e.Text()) - // h.Relocate() + case *tcell.EventPaste: + h.paste(e.Text()) + h.Relocate() case *tcell.EventKey: ke := KeyEvent{ code: e.Key(), diff --git a/internal/action/events.go b/internal/action/events.go index 80596195..5bf6c58e 100644 --- a/internal/action/events.go +++ b/internal/action/events.go @@ -1,7 +1,7 @@ package action import ( - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) type Event interface{} diff --git a/internal/action/infopane.go b/internal/action/infopane.go index 0ded6be2..00dde633 100644 --- a/internal/action/infopane.go +++ b/internal/action/infopane.go @@ -7,7 +7,7 @@ import ( "github.com/zyedidia/micro/internal/display" "github.com/zyedidia/micro/internal/info" "github.com/zyedidia/micro/internal/util" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) type InfoKeyAction func(*InfoPane) diff --git a/internal/action/rawpane.go b/internal/action/rawpane.go index b40db4af..58320ea2 100644 --- a/internal/action/rawpane.go +++ b/internal/action/rawpane.go @@ -3,7 +3,7 @@ package action import ( "reflect" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" "github.com/zyedidia/micro/internal/buffer" "github.com/zyedidia/micro/internal/display" ) diff --git a/internal/action/tab.go b/internal/action/tab.go index f7ae111b..ba29a282 100644 --- a/internal/action/tab.go +++ b/internal/action/tab.go @@ -6,7 +6,7 @@ import ( "github.com/zyedidia/micro/internal/display" "github.com/zyedidia/micro/internal/screen" "github.com/zyedidia/micro/internal/views" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) // The TabList is a list of tabs and a window to display the tab bar diff --git a/internal/action/termpane.go b/internal/action/termpane.go index bde15ae0..8d511f9b 100644 --- a/internal/action/termpane.go +++ b/internal/action/termpane.go @@ -3,7 +3,7 @@ package action import ( "runtime" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" "github.com/zyedidia/clipboard" "github.com/zyedidia/micro/internal/display" "github.com/zyedidia/micro/internal/screen" @@ -78,7 +78,7 @@ func (t *TermPane) HandleEvent(event tcell.Event) { clipboard.WriteAll(t.GetSelection(t.GetView().Width), "clipboard") InfoBar.Message("Copied selection to clipboard") } else if t.Status != shell.TTDone { - // t.WriteString(event.EscSeq()) + t.WriteString(string(e.Rune())) } } else if e, ok := event.(*tcell.EventMouse); e != nil && (!ok || t.State.Mode(terminal.ModeMouseMask)) { // t.WriteString(event.EscSeq()) diff --git a/internal/buffer/backup.go b/internal/buffer/backup.go index 2574c7ad..1ba7acc3 100644 --- a/internal/buffer/backup.go +++ b/internal/buffer/backup.go @@ -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 diff --git a/internal/buffer/message.go b/internal/buffer/message.go index b21dd42f..065d9666 100644 --- a/internal/buffer/message.go +++ b/internal/buffer/message.go @@ -2,7 +2,7 @@ package buffer import ( "github.com/zyedidia/micro/internal/config" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) type MsgType int diff --git a/internal/config/colorscheme.go b/internal/config/colorscheme.go index 8080d7fc..a843c4c6 100644 --- a/internal/config/colorscheme.go +++ b/internal/config/colorscheme.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) // Micro's default style diff --git a/internal/config/colorscheme_test.go b/internal/config/colorscheme_test.go index 494637c0..83080df1 100644 --- a/internal/config/colorscheme_test.go +++ b/internal/config/colorscheme_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) func TestSimpleStringToStyle(t *testing.T) { diff --git a/internal/config/rtfiles.go b/internal/config/rtfiles.go index a8f16e0c..7e86e1b0 100644 --- a/internal/config/rtfiles.go +++ b/internal/config/rtfiles.go @@ -246,13 +246,11 @@ func PluginListRuntimeFiles(fileType RTFiletype) []string { // PluginAddRuntimeFile adds a file to the runtime files for a plugin func PluginAddRuntimeFile(plugin string, filetype RTFiletype, filePath string) error { - log.Println("PLUGIN ADD:", plugin) pl := FindPlugin(plugin) if pl == nil { return errors.New("Plugin " + plugin + " does not exist") } pldir := pl.DirName - log.Println("DIRNAME:", pldir) fullpath := filepath.Join(ConfigDir, "plug", pldir, filePath) if _, err := os.Stat(fullpath); err == nil { AddRuntimeFile(filetype, realFile(fullpath)) diff --git a/internal/display/bufwindow.go b/internal/display/bufwindow.go index 04766d49..ea575416 100644 --- a/internal/display/bufwindow.go +++ b/internal/display/bufwindow.go @@ -1,16 +1,15 @@ package display import ( - "log" "strconv" "unicode/utf8" + "github.com/zyedidia/tcell" runewidth "github.com/mattn/go-runewidth" "github.com/zyedidia/micro/internal/buffer" "github.com/zyedidia/micro/internal/config" "github.com/zyedidia/micro/internal/screen" "github.com/zyedidia/micro/internal/util" - "github.com/gdamore/tcell" ) // The BufWindow provides a way of displaying a certain section @@ -123,7 +122,6 @@ func (w *BufWindow) Bottomline() int { l := w.LocFromVisual(buffer.Loc{0, w.Y + w.Height}) - log.Println("Bottom line:", l.Y) return l.Y } @@ -134,7 +132,6 @@ func (w *BufWindow) Relocate() bool { b := w.Buf // how many buffer lines are in the view height := w.Bottomline() + 1 - w.StartLine - log.Printf("Height: %d, w.Height: %d\n", height, w.Height) h := w.Height if w.drawStatus { h-- diff --git a/internal/display/infowindow.go b/internal/display/infowindow.go index 57a98925..b179c81e 100644 --- a/internal/display/infowindow.go +++ b/internal/display/infowindow.go @@ -9,7 +9,7 @@ import ( "github.com/zyedidia/micro/internal/info" "github.com/zyedidia/micro/internal/screen" "github.com/zyedidia/micro/internal/util" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) type InfoWindow struct { diff --git a/internal/display/termwindow.go b/internal/display/termwindow.go index 5b7797f8..95a90037 100644 --- a/internal/display/termwindow.go +++ b/internal/display/termwindow.go @@ -7,7 +7,7 @@ import ( "github.com/zyedidia/micro/internal/config" "github.com/zyedidia/micro/internal/screen" "github.com/zyedidia/micro/internal/shell" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" "github.com/zyedidia/terminal" ) diff --git a/internal/screen/screen.go b/internal/screen/screen.go index 98af8803..1e149be7 100644 --- a/internal/screen/screen.go +++ b/internal/screen/screen.go @@ -7,7 +7,7 @@ import ( "github.com/zyedidia/micro/internal/config" "github.com/zyedidia/micro/pkg/terminfo" - "github.com/gdamore/tcell" + "github.com/zyedidia/tcell" ) // Screen is the tcell screen we use to draw to the terminal