aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gopkg.lock18
-rw-r--r--Gopkg.toml2
-rw-r--r--termui/bug_table.go2
-rw-r--r--termui/input_popup.go2
-rw-r--r--termui/label_select.go2
-rw-r--r--termui/msg_popup.go2
-rw-r--r--termui/show_bug.go2
-rw-r--r--termui/termui.go2
-rw-r--r--vendor/github.com/MichaelMure/gocui/.gitignore (renamed from vendor/github.com/jroimartin/gocui/.gitignore)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/AUTHORS (renamed from vendor/github.com/jroimartin/gocui/AUTHORS)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/LICENSE (renamed from vendor/github.com/jroimartin/gocui/LICENSE)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/README.md (renamed from vendor/github.com/jroimartin/gocui/README.md)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/attribute.go (renamed from vendor/github.com/jroimartin/gocui/attribute.go)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/doc.go (renamed from vendor/github.com/jroimartin/gocui/doc.go)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/edit.go (renamed from vendor/github.com/jroimartin/gocui/edit.go)27
-rw-r--r--vendor/github.com/MichaelMure/gocui/escape.go (renamed from vendor/github.com/jroimartin/gocui/escape.go)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/gui.go (renamed from vendor/github.com/jroimartin/gocui/gui.go)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/keybinding.go (renamed from vendor/github.com/jroimartin/gocui/keybinding.go)0
-rw-r--r--vendor/github.com/MichaelMure/gocui/view.go (renamed from vendor/github.com/jroimartin/gocui/view.go)3
19 files changed, 34 insertions, 28 deletions
diff --git a/Gopkg.lock b/Gopkg.lock
index 19f4b2ee..0ea5b61b 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -20,6 +20,14 @@
version = "v0.7.1"
[[projects]]
+ branch = "master"
+ digest = "1:38a84d9b4cf50b3e8eb2b54f218413ac163076e3a7763afe5fa15a4eb15fbda6"
+ name = "github.com/MichaelMure/gocui"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "d753c235dd8582d55e99bbb7f7fe453fb3fd3a19"
+
+[[projects]]
digest = "1:897d91c431ce469d35a5e6030e60e617dccd9a0e95bdffa6a80594f5c5800d29"
name = "github.com/agnivade/levenshtein"
packages = ["."]
@@ -156,14 +164,6 @@
version = "v1.0"
[[projects]]
- branch = "master"
- digest = "1:114ecad51af93a73ae6781fd0d0bc28e52b433c852b84ab4b4c109c15e6c6b6d"
- name = "github.com/jroimartin/gocui"
- packages = ["."]
- pruneopts = "UT"
- revision = "c055c87ae801372cd74a0839b972db4f7697ae5f"
-
-[[projects]]
digest = "1:c658e84ad3916da105a761660dcaeb01e63416c8ec7bc62256a9b411a05fcd67"
name = "github.com/mattn/go-colorable"
packages = ["."]
@@ -462,13 +462,13 @@
"github.com/99designs/gqlgen/graphql",
"github.com/99designs/gqlgen/graphql/introspection",
"github.com/99designs/gqlgen/handler",
+ "github.com/MichaelMure/gocui",
"github.com/cheekybits/genny/generic",
"github.com/dustin/go-humanize",
"github.com/fatih/color",
"github.com/go-test/deep",
"github.com/gorilla/mux",
"github.com/icrowley/fake",
- "github.com/jroimartin/gocui",
"github.com/phayes/freeport",
"github.com/pkg/errors",
"github.com/shurcooL/githubv4",
diff --git a/Gopkg.toml b/Gopkg.toml
index 79acb49d..0fe18091 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -61,5 +61,5 @@
version = "0.7.1"
[[constraint]]
- name = "github.com/jroimartin/gocui"
+ 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 091e9b99..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/jroimartin/gocui"
)
const bugTableView = "bugTableView"
diff --git a/termui/input_popup.go b/termui/input_popup.go
index db0ec619..3576ba2f 100644
--- a/termui/input_popup.go
+++ b/termui/input_popup.go
@@ -3,7 +3,7 @@ package termui
import (
"io/ioutil"
- "github.com/jroimartin/gocui"
+ "github.com/MichaelMure/gocui"
)
const inputPopupView = "inputPopupView"
diff --git a/termui/label_select.go b/termui/label_select.go
index 244001df..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/jroimartin/gocui"
+ "github.com/MichaelMure/gocui"
)
const labelSelectView = "labelSelectView"
diff --git a/termui/msg_popup.go b/termui/msg_popup.go
index 0ce390dc..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/jroimartin/gocui"
+ "github.com/MichaelMure/gocui"
)
const msgPopupView = "msgPopupView"
diff --git a/termui/show_bug.go b/termui/show_bug.go
index a1f4b3fe..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/jroimartin/gocui"
+ "github.com/MichaelMure/gocui"
)
const showBugView = "showBugView"
diff --git a/termui/termui.go b/termui/termui.go
index 9f68efcc..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/jroimartin/gocui"
+ "github.com/MichaelMure/gocui"
"github.com/pkg/errors"
)
diff --git a/vendor/github.com/jroimartin/gocui/.gitignore b/vendor/github.com/MichaelMure/gocui/.gitignore
index 1377554e..1377554e 100644
--- a/vendor/github.com/jroimartin/gocui/.gitignore
+++ b/vendor/github.com/MichaelMure/gocui/.gitignore
diff --git a/vendor/github.com/jroimartin/gocui/AUTHORS b/vendor/github.com/MichaelMure/gocui/AUTHORS
index 43ec4cec..43ec4cec 100644
--- a/vendor/github.com/jroimartin/gocui/AUTHORS
+++ b/vendor/github.com/MichaelMure/gocui/AUTHORS
diff --git a/vendor/github.com/jroimartin/gocui/LICENSE b/vendor/github.com/MichaelMure/gocui/LICENSE
index 8cb28215..8cb28215 100644
--- a/vendor/github.com/jroimartin/gocui/LICENSE
+++ b/vendor/github.com/MichaelMure/gocui/LICENSE
diff --git a/vendor/github.com/jroimartin/gocui/README.md b/vendor/github.com/MichaelMure/gocui/README.md
index d7b55a3b..d7b55a3b 100644
--- a/vendor/github.com/jroimartin/gocui/README.md
+++ b/vendor/github.com/MichaelMure/gocui/README.md
diff --git a/vendor/github.com/jroimartin/gocui/attribute.go b/vendor/github.com/MichaelMure/gocui/attribute.go
index bad758a1..bad758a1 100644
--- a/vendor/github.com/jroimartin/gocui/attribute.go
+++ b/vendor/github.com/MichaelMure/gocui/attribute.go
diff --git a/vendor/github.com/jroimartin/gocui/doc.go b/vendor/github.com/MichaelMure/gocui/doc.go
index fe128afb..fe128afb 100644
--- a/vendor/github.com/jroimartin/gocui/doc.go
+++ b/vendor/github.com/MichaelMure/gocui/doc.go
diff --git a/vendor/github.com/jroimartin/gocui/edit.go b/vendor/github.com/MichaelMure/gocui/edit.go
index e1b19c20..de86580f 100644
--- a/vendor/github.com/jroimartin/gocui/edit.go
+++ b/vendor/github.com/MichaelMure/gocui/edit.go
@@ -4,7 +4,11 @@
package gocui
-import "errors"
+import (
+ "errors"
+
+ "github.com/mattn/go-runewidth"
+)
const maxInt = int(^uint(0) >> 1)
@@ -55,7 +59,7 @@ func simpleEditor(v *View, key Key, ch rune, mod Modifier) {
// EditWrite writes a rune at the cursor position.
func (v *View) EditWrite(ch rune) {
v.writeRune(v.cx, v.cy, ch)
- v.MoveCursor(1, 0, true)
+ v.MoveCursor(runewidth.RuneWidth(ch), 0, true)
}
// EditDelete deletes a rune at the cursor position. back determines the
@@ -89,12 +93,12 @@ func (v *View) EditDelete(back bool) {
v.MoveCursor(-1, 0, true)
}
} else { // wrapped line
- v.deleteRune(len(v.viewLines[y-1].line)-1, v.cy-1)
- v.MoveCursor(-1, 0, true)
+ ch, _ := v.deleteRune(len(v.viewLines[y-1].line)-1, v.cy-1)
+ v.MoveCursor(0-runewidth.RuneWidth(ch), 0, true)
}
} else { // middle/end of the line
- v.deleteRune(v.cx-1, v.cy)
- v.MoveCursor(-1, 0, true)
+ ch, _ := v.deleteRune(v.cx-1, v.cy)
+ v.MoveCursor(0-runewidth.RuneWidth(ch), 0, true)
}
} else {
if x == len(v.viewLines[y].line) { // end of the line
@@ -275,19 +279,20 @@ func (v *View) writeRune(x, y int, ch rune) error {
// deleteRune removes a rune from the view's internal buffer, at the
// position corresponding to the point (x, y).
-func (v *View) deleteRune(x, y int) error {
+func (v *View) deleteRune(x, y int) (ch rune, err error) {
v.tainted = true
- x, y, err := v.realPosition(x, y)
+ x, y, err = v.realPosition(x, y)
if err != nil {
- return err
+ return 0, err
}
if x < 0 || y < 0 || y >= len(v.lines) || x >= len(v.lines[y]) {
- return errors.New("invalid point")
+ return 0, errors.New("invalid point")
}
+ chx := v.lines[y][x]
v.lines[y] = append(v.lines[y][:x], v.lines[y][x+1:]...)
- return nil
+ return chx.chr, nil
}
// mergeLines merges the lines "y" and "y+1" if possible.
diff --git a/vendor/github.com/jroimartin/gocui/escape.go b/vendor/github.com/MichaelMure/gocui/escape.go
index ec31bbe0..ec31bbe0 100644
--- a/vendor/github.com/jroimartin/gocui/escape.go
+++ b/vendor/github.com/MichaelMure/gocui/escape.go
diff --git a/vendor/github.com/jroimartin/gocui/gui.go b/vendor/github.com/MichaelMure/gocui/gui.go
index 9499d3c3..9499d3c3 100644
--- a/vendor/github.com/jroimartin/gocui/gui.go
+++ b/vendor/github.com/MichaelMure/gocui/gui.go
diff --git a/vendor/github.com/jroimartin/gocui/keybinding.go b/vendor/github.com/MichaelMure/gocui/keybinding.go
index 03fe677c..03fe677c 100644
--- a/vendor/github.com/jroimartin/gocui/keybinding.go
+++ b/vendor/github.com/MichaelMure/gocui/keybinding.go
diff --git a/vendor/github.com/jroimartin/gocui/view.go b/vendor/github.com/MichaelMure/gocui/view.go
index 42082f8c..d7943497 100644
--- a/vendor/github.com/jroimartin/gocui/view.go
+++ b/vendor/github.com/MichaelMure/gocui/view.go
@@ -10,6 +10,7 @@ import (
"io"
"strings"
+ "github.com/mattn/go-runewidth"
"github.com/nsf/termbox-go"
)
@@ -353,7 +354,7 @@ func (v *View) draw() error {
if err := v.setRune(x, y, c.chr, fgColor, bgColor); err != nil {
return err
}
- x++
+ x += runewidth.RuneWidth(c.chr)
}
y++
}