aboutsummaryrefslogtreecommitdiff
path: root/ui/tcell
diff options
context:
space:
mode:
Diffstat (limited to 'ui/tcell')
-rw-r--r--ui/tcell/tcell.go2
-rw-r--r--ui/tcell/view.go8
-rw-r--r--ui/tcell/window.go2
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"
)