diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2021-03-03 14:33:37 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2021-03-03 14:33:37 +0100 |
commit | 89eb5668d877d61aeb8a8f559a5c110e54089644 (patch) | |
tree | c5834ba042336f64e1966e58ba0d8afe5e919657 /ui/tcell | |
parent | 1a34cf54f15f8a68550b904cc95ac1cd116b7d6c (diff) | |
download | poe-89eb5668d877d61aeb8a8f559a5c110e54089644.tar.gz poe-89eb5668d877d61aeb8a8f559a5c110e54089644.tar.bz2 poe-89eb5668d877d61aeb8a8f559a5c110e54089644.zip |
Upgrade dep: tcell to v2.
Diffstat (limited to 'ui/tcell')
-rw-r--r-- | ui/tcell/tcell.go | 2 | ||||
-rw-r--r-- | ui/tcell/view.go | 8 | ||||
-rw-r--r-- | ui/tcell/window.go | 2 |
3 files changed, 6 insertions, 6 deletions
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" ) |