aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod1
-rw-r--r--go.sum6
-rw-r--r--ui/tcell/tcell.go2
-rw-r--r--ui/tcell/view.go8
-rw-r--r--ui/tcell/window.go2
5 files changed, 13 insertions, 6 deletions
diff --git a/go.mod b/go.mod
index 2daf70a..fbdbf45 100644
--- a/go.mod
+++ b/go.mod
@@ -6,6 +6,7 @@ require (
github.com/DATA-DOG/go-sqlmock v1.3.3 // indirect
github.com/atotto/clipboard v0.1.4
github.com/gdamore/tcell v1.4.0
+ github.com/gdamore/tcell/v2 v2.2.0
github.com/mattn/go-runewidth v0.0.10
github.com/pkg/errors v0.9.1
)
diff --git a/go.sum b/go.sum
index 233791a..dd10ecb 100644
--- a/go.sum
+++ b/go.sum
@@ -10,6 +10,8 @@ github.com/gdamore/tcell v1.3.0 h1:r35w0JBADPZCVQijYebl6YMWWtHRqVEGt7kL2eBADRM=
github.com/gdamore/tcell v1.3.0/go.mod h1:Hjvr+Ofd+gLglo7RYKxxnzCBmev3BzsS67MebKS4zMM=
github.com/gdamore/tcell v1.4.0 h1:vUnHwJRvcPQa3tzi+0QI4U9JINXYJlOz9yiaiPQ2wMU=
github.com/gdamore/tcell v1.4.0/go.mod h1:vxEiSDZdW3L+Uhjii9c3375IlDmR05bzxY404ZVSMo0=
+github.com/gdamore/tcell/v2 v2.2.0 h1:vSyEgKwraXPSOkvCk7IwOSyX+Pv3V2cV9CikJMXg4U4=
+github.com/gdamore/tcell/v2 v2.2.0/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU=
github.com/lucasb-eyer/go-colorful v1.0.2 h1:mCMFu6PgSozg9tDNMMK3g18oJBX7oYGrC09mS6CXfO4=
github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s=
github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac=
@@ -27,5 +29,9 @@ github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756 h1:9nuHUbU8dRnRRfj9KjWUVrJeoexdbeMjttk6Oh1rD10=
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M=
+golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
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"
)