aboutsummaryrefslogtreecommitdiffstats
path: root/termui/bug_table.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-11-03 20:47:29 +0100
committerMichael Muré <batolettre@gmail.com>2019-11-03 20:47:29 +0100
commitcb8236c9c22007eb622b7219c58d3342f1f53d50 (patch)
treee232e5362486065d9b28bb55b9791690efb50c08 /termui/bug_table.go
parent163ea9c93306c387f84ff0b85c2d8fca4c01e449 (diff)
downloadgit-bug-cb8236c9c22007eb622b7219c58d3342f1f53d50.tar.gz
termui: migrate to awesome-gocui instead of the old fork I had
Diffstat (limited to 'termui/bug_table.go')
-rw-r--r--termui/bug_table.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go
index c432c94a..ee02a167 100644
--- a/termui/bug_table.go
+++ b/termui/bug_table.go
@@ -7,7 +7,7 @@ import (
"time"
"github.com/MichaelMure/go-term-text"
- "github.com/MichaelMure/gocui"
+ "github.com/awesome-gocui/gocui"
"github.com/dustin/go-humanize"
"github.com/MichaelMure/git-bug/cache"
@@ -56,10 +56,10 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
return nil
}
- v, err := g.SetView(bugTableHeaderView, -1, -1, maxX, 3)
+ v, err := g.SetView(bugTableHeaderView, -1, -1, maxX, 3, 0)
if err != nil {
- if err != gocui.ErrUnknownView {
+ if !gocui.IsUnknownView(err) {
return err
}
@@ -69,10 +69,10 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v.Clear()
bt.renderHeader(v, maxX)
- v, err = g.SetView(bugTableView, -1, 1, maxX, maxY-3)
+ v, err = g.SetView(bugTableView, -1, 1, maxX, maxY-3, 0)
if err != nil {
- if err != gocui.ErrUnknownView {
+ if !gocui.IsUnknownView(err) {
return err
}
@@ -100,10 +100,10 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v.Clear()
bt.render(v, maxX)
- v, err = g.SetView(bugTableFooterView, -1, maxY-4, maxX, maxY)
+ v, err = g.SetView(bugTableFooterView, -1, maxY-4, maxX, maxY, 0)
if err != nil {
- if err != gocui.ErrUnknownView {
+ if !gocui.IsUnknownView(err) {
return err
}
@@ -113,10 +113,10 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v.Clear()
bt.renderFooter(v, maxX)
- v, err = g.SetView(bugTableInstructionView, -1, maxY-2, maxX, maxY)
+ v, err = g.SetView(bugTableInstructionView, -1, maxY-2, maxX, maxY, 0)
if err != nil {
- if err != gocui.ErrUnknownView {
+ if !gocui.IsUnknownView(err) {
return err
}
@@ -216,16 +216,16 @@ func (bt *bugTable) keybindings(g *gocui.Gui) error {
}
func (bt *bugTable) disable(g *gocui.Gui) error {
- if err := g.DeleteView(bugTableView); err != nil && err != gocui.ErrUnknownView {
+ if err := g.DeleteView(bugTableView); err != nil && !gocui.IsUnknownView(err) {
return err
}
- if err := g.DeleteView(bugTableHeaderView); err != nil && err != gocui.ErrUnknownView {
+ if err := g.DeleteView(bugTableHeaderView); err != nil && !gocui.IsUnknownView(err) {
return err
}
- if err := g.DeleteView(bugTableFooterView); err != nil && err != gocui.ErrUnknownView {
+ if err := g.DeleteView(bugTableFooterView); err != nil && !gocui.IsUnknownView(err) {
return err
}
- if err := g.DeleteView(bugTableInstructionView); err != nil && err != gocui.ErrUnknownView {
+ if err := g.DeleteView(bugTableInstructionView); err != nil && !gocui.IsUnknownView(err) {
return err
}
return nil