From 89eb5668d877d61aeb8a8f559a5c110e54089644 Mon Sep 17 00:00:00 2001 From: Petter Rodhelind Date: Wed, 3 Mar 2021 14:33:37 +0100 Subject: Upgrade dep: tcell to v2. --- ui/tcell/tcell.go | 2 +- ui/tcell/view.go | 8 ++++---- ui/tcell/window.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'ui/tcell') diff --git a/ui/tcell/tcell.go b/ui/tcell/tcell.go index 1ebc0cc..c905704 100644 --- a/ui/tcell/tcell.go +++ b/ui/tcell/tcell.go @@ -5,7 +5,7 @@ import ( "path/filepath" "strings" - "github.com/gdamore/tcell" + tcell "github.com/gdamore/tcell/v2" "github.com/prodhe/poe/editor" ) diff --git a/ui/tcell/view.go b/ui/tcell/view.go index 7c0eb64..b04b96a 100644 --- a/ui/tcell/view.go +++ b/ui/tcell/view.go @@ -8,7 +8,7 @@ import ( "unicode/utf8" "github.com/atotto/clipboard" - "github.com/gdamore/tcell" + tcell "github.com/gdamore/tcell/v2" runewidth "github.com/mattn/go-runewidth" "github.com/prodhe/poe/editor" ) @@ -377,7 +377,7 @@ func (v *View) HandleEvent(ev tcell.Event) { if v.mpressed { v.mpressed = false } - case tcell.Button1: + case tcell.ButtonPrimary: pos := v.XYToOffset(mx, my) if v.mpressed { // select text via click-n-drag if pos > v.mclickpos { @@ -458,7 +458,7 @@ func (v *View) HandleEvent(ev tcell.Event) { v.Scroll(-1) case tcell.WheelDown: // scrolldown v.Scroll(1) - case tcell.Button2: // middle click + case tcell.ButtonMiddle: // middle click pos := v.XYToOffset(mx, my) // if we clicked inside a current selection, run that one q0, q1 := v.text.Dot() @@ -475,7 +475,7 @@ func (v *View) HandleEvent(ev tcell.Event) { v.text.SetDot(q0, q1) Cmd(fn) return - case tcell.Button3: // right click + case tcell.ButtonSecondary: // right click pos := v.XYToOffset(mx, my) // if we clicked inside a current selection, open that one q0, q1 := v.text.Dot() diff --git a/ui/tcell/window.go b/ui/tcell/window.go index b52fbaf..ba4220c 100644 --- a/ui/tcell/window.go +++ b/ui/tcell/window.go @@ -3,7 +3,7 @@ package uitcell import ( "fmt" - "github.com/gdamore/tcell" + tcell "github.com/gdamore/tcell/v2" "github.com/prodhe/poe/editor" ) -- cgit v1.2.3