aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Zhang <yang_zhang@iapcm.ac.cn>2018-12-28 22:47:59 +0800
committerYang Zhang <yang_zhang@iapcm.ac.cn>2018-12-30 08:38:31 +0800
commitd823bc572801c8f324584e6fd85c57bc83d551db (patch)
tree2c77c6ffd98c56390eb3b4001f05144cd880d0d4
parentd31891504d201423f512d897d44dd71b06dad93d (diff)
downloadgit-bug-d823bc572801c8f324584e6fd85c57bc83d551db.tar.gz
Revert to MichaelMure's fork of gocui
-rw-r--r--Gopkg.toml4
-rw-r--r--termui/bug_table.go10
-rw-r--r--termui/input_popup.go4
-rw-r--r--termui/label_select.go8
-rw-r--r--termui/msg_popup.go4
-rw-r--r--termui/show_bug.go12
-rw-r--r--termui/termui.go4
7 files changed, 23 insertions, 23 deletions
diff --git a/Gopkg.toml b/Gopkg.toml
index 93a89ad6..0fe18091 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -61,5 +61,5 @@
version = "0.7.1"
[[constraint]]
- name = "github.com/jesseduffield/gocui"
- branch = "master"
+ name = "github.com/MichaelMure/gocui"
+ branch = "master" \ No newline at end of file
diff --git a/termui/bug_table.go b/termui/bug_table.go
index 31e38d08..13d86aa7 100644
--- a/termui/bug_table.go
+++ b/termui/bug_table.go
@@ -8,8 +8,8 @@ import (
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/util/colors"
"github.com/MichaelMure/git-bug/util/text"
+ "github.com/MichaelMure/gocui"
"github.com/dustin/go-humanize"
- "github.com/jesseduffield/gocui"
)
const bugTableView = "bugTableView"
@@ -53,7 +53,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
return nil
}
- v, err := g.SetView(bugTableHeaderView, -1, -1, maxX, 3, 0)
+ v, err := g.SetView(bugTableHeaderView, -1, -1, maxX, 3)
if err != nil {
if err != gocui.ErrUnknownView {
@@ -66,7 +66,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v.Clear()
bt.renderHeader(v, maxX)
- v, err = g.SetView(bugTableView, -1, 1, maxX, maxY-3, 0)
+ v, err = g.SetView(bugTableView, -1, 1, maxX, maxY-3)
if err != nil {
if err != gocui.ErrUnknownView {
@@ -97,7 +97,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v.Clear()
bt.render(v, maxX)
- v, err = g.SetView(bugTableFooterView, -1, maxY-4, maxX, maxY, 0)
+ v, err = g.SetView(bugTableFooterView, -1, maxY-4, maxX, maxY)
if err != nil {
if err != gocui.ErrUnknownView {
@@ -110,7 +110,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v.Clear()
bt.renderFooter(v, maxX)
- v, err = g.SetView(bugTableInstructionView, -1, maxY-2, maxX, maxY, 0)
+ v, err = g.SetView(bugTableInstructionView, -1, maxY-2, maxX, maxY)
if err != nil {
if err != gocui.ErrUnknownView {
diff --git a/termui/input_popup.go b/termui/input_popup.go
index 7500168f..3576ba2f 100644
--- a/termui/input_popup.go
+++ b/termui/input_popup.go
@@ -3,7 +3,7 @@ package termui
import (
"io/ioutil"
- "github.com/jesseduffield/gocui"
+ "github.com/MichaelMure/gocui"
)
const inputPopupView = "inputPopupView"
@@ -46,7 +46,7 @@ func (ip *inputPopup) layout(g *gocui.Gui) error {
x0 := (maxX - width) / 2
y0 := (maxY - height) / 2
- v, err := g.SetView(inputPopupView, x0, y0, x0+width, y0+height, 0)
+ v, err := g.SetView(inputPopupView, x0, y0, x0+width, y0+height)
if err != nil {
if err != gocui.ErrUnknownView {
return err
diff --git a/termui/label_select.go b/termui/label_select.go
index c93dd833..026eba04 100644
--- a/termui/label_select.go
+++ b/termui/label_select.go
@@ -6,7 +6,7 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
- "github.com/jesseduffield/gocui"
+ "github.com/MichaelMure/gocui"
)
const labelSelectView = "labelSelectView"
@@ -105,7 +105,7 @@ func (ls *labelSelect) layout(g *gocui.Gui) error {
x0 := 1
y0 := 0 - ls.scroll
- v, err := g.SetView(labelSelectView, x0, 0, x0+width, maxY-2, 0)
+ v, err := g.SetView(labelSelectView, x0, 0, x0+width, maxY-2)
if err != nil {
if err != gocui.ErrUnknownView {
return err
@@ -116,7 +116,7 @@ func (ls *labelSelect) layout(g *gocui.Gui) error {
for i, label := range ls.labels {
viewname := fmt.Sprintf("view%d", i)
- v, err := g.SetView(viewname, x0+2, y0, x0+width-2, y0+2, 0)
+ v, err := g.SetView(viewname, x0+2, y0, x0+width-2, y0+2)
if err != nil && err != gocui.ErrUnknownView {
return err
}
@@ -131,7 +131,7 @@ func (ls *labelSelect) layout(g *gocui.Gui) error {
y0 += 2
}
- v, err = g.SetView(labelSelectInstructionsView, -1, maxY-2, maxX, maxY, 0)
+ v, err = g.SetView(labelSelectInstructionsView, -1, maxY-2, maxX, maxY)
ls.childViews = append(ls.childViews, labelSelectInstructionsView)
if err != nil {
if err != gocui.ErrUnknownView {
diff --git a/termui/msg_popup.go b/termui/msg_popup.go
index af752106..4452427e 100644
--- a/termui/msg_popup.go
+++ b/termui/msg_popup.go
@@ -4,7 +4,7 @@ import (
"fmt"
"github.com/MichaelMure/git-bug/util/text"
- "github.com/jesseduffield/gocui"
+ "github.com/MichaelMure/gocui"
)
const msgPopupView = "msgPopupView"
@@ -50,7 +50,7 @@ func (ep *msgPopup) layout(g *gocui.Gui) error {
x0 := (maxX - width) / 2
y0 := (maxY - height) / 2
- v, err := g.SetView(msgPopupView, x0, y0, x0+width, y0+height, 0)
+ v, err := g.SetView(msgPopupView, x0, y0, x0+width, y0+height)
if err != nil {
if err != gocui.ErrUnknownView {
return err
diff --git a/termui/show_bug.go b/termui/show_bug.go
index 49754d83..55d86018 100644
--- a/termui/show_bug.go
+++ b/termui/show_bug.go
@@ -10,7 +10,7 @@ import (
"github.com/MichaelMure/git-bug/util/colors"
"github.com/MichaelMure/git-bug/util/git"
"github.com/MichaelMure/git-bug/util/text"
- "github.com/jesseduffield/gocui"
+ "github.com/MichaelMure/gocui"
)
const showBugView = "showBugView"
@@ -48,7 +48,7 @@ func (sb *showBug) layout(g *gocui.Gui) error {
maxX, maxY := g.Size()
sb.childViews = nil
- v, err := g.SetView(showBugView, 0, 0, maxX*2/3, maxY-2, 0)
+ v, err := g.SetView(showBugView, 0, 0, maxX*2/3, maxY-2)
if err != nil {
if err != gocui.ErrUnknownView {
@@ -65,7 +65,7 @@ func (sb *showBug) layout(g *gocui.Gui) error {
return err
}
- v, err = g.SetView(showBugSidebarView, maxX*2/3+1, 0, maxX-1, maxY-2, 0)
+ v, err = g.SetView(showBugSidebarView, maxX*2/3+1, 0, maxX-1, maxY-2)
if err != nil {
if err != gocui.ErrUnknownView {
@@ -82,7 +82,7 @@ func (sb *showBug) layout(g *gocui.Gui) error {
return err
}
- v, err = g.SetView(showBugInstructionView, -1, maxY-2, maxX, maxY, 0)
+ v, err = g.SetView(showBugInstructionView, -1, maxY-2, maxX, maxY)
if err != nil {
if err != gocui.ErrUnknownView {
@@ -382,7 +382,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)
+ v, err := g.SetView(name, x0, y0, maxX, y0+height+1)
if err != nil && err != gocui.ErrUnknownView {
return nil, err
@@ -402,7 +402,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)
+ v, err := g.SetView(name, x0, y0, maxX, y0+height+1)
if err != nil && err != gocui.ErrUnknownView {
return nil, err
diff --git a/termui/termui.go b/termui/termui.go
index d11a57ba..78900de8 100644
--- a/termui/termui.go
+++ b/termui/termui.go
@@ -5,7 +5,7 @@ import (
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/input"
"github.com/MichaelMure/git-bug/util/git"
- "github.com/jesseduffield/gocui"
+ "github.com/MichaelMure/gocui"
"github.com/pkg/errors"
)
@@ -69,7 +69,7 @@ func Run(cache *cache.RepoCache) error {
}
func initGui(action func(ui *termUI) error) {
- g, err := gocui.NewGui(gocui.OutputNormal, false)
+ g, err := gocui.NewGui(gocui.OutputNormal)
if err != nil {
ui.gError <- err