aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--go.mod2
-rw-r--r--go.sum17
-rw-r--r--termui/bug_table.go17
-rw-r--r--termui/input_popup.go3
-rw-r--r--termui/label_select.go9
-rw-r--r--termui/msg_popup.go5
-rw-r--r--termui/show_bug.go15
7 files changed, 38 insertions, 30 deletions
diff --git a/go.mod b/go.mod
index 2fcf0fd2..dfaa8519 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@ require (
github.com/MichaelMure/go-term-text v0.3.1
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7
github.com/araddon/dateparse v0.0.0-20190622164848-0fb0a474d195
- github.com/awesome-gocui/gocui v0.6.1-0.20191115151952-a34ffb055986
+ github.com/awesome-gocui/gocui v1.1.0
github.com/blevesearch/bleve v1.0.14
github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9
github.com/corpix/uarand v0.1.1 // indirect
diff --git a/go.sum b/go.sum
index c96e083d..792f9dc8 100644
--- a/go.sum
+++ b/go.sum
@@ -94,10 +94,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
-github.com/awesome-gocui/gocui v0.6.1-0.20191115151952-a34ffb055986 h1:QvIfX96O11qjX1Zr3hKkG0dI12JBRBGABWffyZ1GI60=
-github.com/awesome-gocui/gocui v0.6.1-0.20191115151952-a34ffb055986/go.mod h1:1QikxFaPhe2frKeKvEwZEIGia3haiOxOUXKinrv17mA=
-github.com/awesome-gocui/termbox-go v0.0.0-20190427202837-c0aef3d18bcc h1:wGNpKcHU8Aadr9yOzsT3GEsFLS7HQu8HxQIomnekqf0=
-github.com/awesome-gocui/termbox-go v0.0.0-20190427202837-c0aef3d18bcc/go.mod h1:tOy3o5Nf1bA17mnK4W41gD7PS3u4Cv0P0pqFcoWMy8s=
+github.com/awesome-gocui/gocui v1.1.0 h1:db2j7yFEoHZjpQFeE2xqiatS8bm1lO3THeLwE6MzOII=
+github.com/awesome-gocui/gocui v1.1.0/go.mod h1:M2BXkrp7PR97CKnPRT7Rk0+rtswChPtksw/vRAESGpg=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -219,6 +217,10 @@ github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
+github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
+github.com/gdamore/tcell/v2 v2.4.0 h1:W6dxJEmaxYvhICFoTY3WrLLEXsQ11SaFnKGVEXW57KM=
+github.com/gdamore/tcell/v2 v2.4.0/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
@@ -226,8 +228,6 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8=
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
-github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
-github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
@@ -417,6 +417,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
+github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac=
+github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
@@ -436,7 +438,7 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
-github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow=
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
@@ -800,6 +802,7 @@ golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a h1:ppl5mZgokTT8uPkmYOyEUmPTr3ypaKkg5eFOGrAmxxE=
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/termui/bug_table.go b/termui/bug_table.go
index 94185a29..f3f8b2f3 100644
--- a/termui/bug_table.go
+++ b/termui/bug_table.go
@@ -2,6 +2,7 @@ package termui
import (
"bytes"
+ "errors"
"fmt"
"strings"
@@ -69,7 +70,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v, err := g.SetView(bugTableHeaderView, -1, -1, maxX, 1, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -82,7 +83,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v, err = g.SetView(bugTableView, -1, 0, maxX, maxY-3, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -108,7 +109,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v, err = g.SetView(bugTableFooterView, -1, maxY-4, maxX, maxY, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -121,7 +122,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v, err = g.SetView(bugTableInstructionView, -1, maxY-2, maxX, maxY, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -221,16 +222,16 @@ func (bt *bugTable) keybindings(g *gocui.Gui) error {
}
func (bt *bugTable) disable(g *gocui.Gui) error {
- if err := g.DeleteView(bugTableView); err != nil && !gocui.IsUnknownView(err) {
+ if err := g.DeleteView(bugTableView); err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return err
}
- if err := g.DeleteView(bugTableHeaderView); err != nil && !gocui.IsUnknownView(err) {
+ if err := g.DeleteView(bugTableHeaderView); err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return err
}
- if err := g.DeleteView(bugTableFooterView); err != nil && !gocui.IsUnknownView(err) {
+ if err := g.DeleteView(bugTableFooterView); err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return err
}
- if err := g.DeleteView(bugTableInstructionView); err != nil && !gocui.IsUnknownView(err) {
+ if err := g.DeleteView(bugTableInstructionView); err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return err
}
return nil
diff --git a/termui/input_popup.go b/termui/input_popup.go
index 3ff9b5bf..a60b1c04 100644
--- a/termui/input_popup.go
+++ b/termui/input_popup.go
@@ -1,6 +1,7 @@
package termui
import (
+ "errors"
"io/ioutil"
"github.com/awesome-gocui/gocui"
@@ -48,7 +49,7 @@ func (ip *inputPopup) layout(g *gocui.Gui) error {
v, err := g.SetView(inputPopupView, x0, y0, x0+width, y0+height, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
diff --git a/termui/label_select.go b/termui/label_select.go
index dfba20a6..d5ea5bd3 100644
--- a/termui/label_select.go
+++ b/termui/label_select.go
@@ -1,6 +1,7 @@
package termui
import (
+ "errors"
"fmt"
"strings"
@@ -114,7 +115,7 @@ func (ls *labelSelect) layout(g *gocui.Gui) error {
v, err := g.SetView(labelSelectView, x0, 0, x0+width, maxY-2, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -124,7 +125,7 @@ func (ls *labelSelect) layout(g *gocui.Gui) error {
for i, label := range ls.labels {
viewname := fmt.Sprintf("labeledit%d", i)
v, err := g.SetView(viewname, x0+2, y0, x0+width+2, y0+2, 0)
- if err != nil && !gocui.IsUnknownView(err) {
+ if err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return err
}
ls.childViews = append(ls.childViews, viewname)
@@ -146,7 +147,7 @@ func (ls *labelSelect) layout(g *gocui.Gui) error {
v, err = g.SetView(labelSelectInstructionsView, -1, maxY-2, maxX, maxY, 0)
ls.childViews = append(ls.childViews, labelSelectInstructionsView)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
v.Frame = false
@@ -165,7 +166,7 @@ func (ls *labelSelect) layout(g *gocui.Gui) error {
func (ls *labelSelect) disable(g *gocui.Gui) error {
for _, view := range ls.childViews {
- if err := g.DeleteView(view); err != nil && !gocui.IsUnknownView(err) {
+ if err := g.DeleteView(view); err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return err
}
}
diff --git a/termui/msg_popup.go b/termui/msg_popup.go
index d0e31634..c8db2df4 100644
--- a/termui/msg_popup.go
+++ b/termui/msg_popup.go
@@ -1,9 +1,10 @@
package termui
import (
+ "errors"
"fmt"
- "github.com/MichaelMure/go-term-text"
+ text "github.com/MichaelMure/go-term-text"
"github.com/awesome-gocui/gocui"
)
@@ -52,7 +53,7 @@ func (ep *msgPopup) layout(g *gocui.Gui) error {
v, err := g.SetView(msgPopupView, x0, y0, x0+width, y0+height, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
diff --git a/termui/show_bug.go b/termui/show_bug.go
index 0710fa34..528d1fa5 100644
--- a/termui/show_bug.go
+++ b/termui/show_bug.go
@@ -2,10 +2,11 @@ package termui
import (
"bytes"
+ "errors"
"fmt"
"strings"
- "github.com/MichaelMure/go-term-text"
+ text "github.com/MichaelMure/go-term-text"
"github.com/awesome-gocui/gocui"
"github.com/MichaelMure/git-bug/bug"
@@ -61,7 +62,7 @@ func (sb *showBug) layout(g *gocui.Gui) error {
v, err := g.SetView(showBugView, 0, 0, maxX*2/3, maxY-2, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -78,7 +79,7 @@ func (sb *showBug) layout(g *gocui.Gui) error {
v, err = g.SetView(showBugSidebarView, maxX*2/3+1, 0, maxX-1, maxY-2, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -95,7 +96,7 @@ func (sb *showBug) layout(g *gocui.Gui) error {
v, err = g.SetView(showBugInstructionView, -1, maxY-2, maxX, maxY, 0)
if err != nil {
- if !gocui.IsUnknownView(err) {
+ if !errors.Is(err, gocui.ErrUnknownView) {
return err
}
@@ -199,7 +200,7 @@ func (sb *showBug) keybindings(g *gocui.Gui) error {
func (sb *showBug) disable(g *gocui.Gui) error {
for _, view := range sb.childViews {
- if err := g.DeleteView(view); err != nil && !gocui.IsUnknownView(err) {
+ if err := g.DeleteView(view); err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return err
}
}
@@ -384,7 +385,7 @@ func emptyMessagePlaceholder() string {
func (sb *showBug) createOpView(g *gocui.Gui, name string, x0 int, y0 int, maxX int, height int, selectable bool) (*gocui.View, error) {
v, err := g.SetView(name, x0, y0, maxX, y0+height+1, 0)
- if err != nil && !gocui.IsUnknownView(err) {
+ if err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return nil, err
}
@@ -404,7 +405,7 @@ func (sb *showBug) createOpView(g *gocui.Gui, name string, x0 int, y0 int, maxX
func (sb *showBug) createSideView(g *gocui.Gui, name string, x0 int, y0 int, maxX int, height int) (*gocui.View, error) {
v, err := g.SetView(name, x0, y0, maxX, y0+height+1, 0)
- if err != nil && !gocui.IsUnknownView(err) {
+ if err != nil && !errors.Is(err, gocui.ErrUnknownView) {
return nil, err
}