aboutsummaryrefslogtreecommitdiff
path: root/ui/tcell/view.go
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2021-03-03 14:33:37 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2021-03-03 14:33:37 +0100
commit89eb5668d877d61aeb8a8f559a5c110e54089644 (patch)
treec5834ba042336f64e1966e58ba0d8afe5e919657 /ui/tcell/view.go
parent1a34cf54f15f8a68550b904cc95ac1cd116b7d6c (diff)
downloadpoe-89eb5668d877d61aeb8a8f559a5c110e54089644.tar.gz
poe-89eb5668d877d61aeb8a8f559a5c110e54089644.tar.bz2
poe-89eb5668d877d61aeb8a8f559a5c110e54089644.zip
Upgrade dep: tcell to v2.
Diffstat (limited to 'ui/tcell/view.go')
-rw-r--r--ui/tcell/view.go8
1 files changed, 4 insertions, 4 deletions
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()