summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorMark Kopenga <mkopenga@gmail.com>2018-12-19 08:44:14 +0100
committerGitHub <noreply@github.com>2018-12-19 08:44:14 +0100
commitaa30e006433628ba9281652952b34d8aacda9c01 (patch)
tree2372ba6742ed64717384e9a2acab2807096f001c /vendor
parent7835fce7084632ba93ea5f95c20d4cdfbeb526e6 (diff)
parentcf56dcf9ff1b548b2becd9058dbcd3d81639bce4 (diff)
Merge branch 'master' into https-ask-for-username-password
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 939d1bdfa..6b80b9050 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -148,7 +148,6 @@ func (v *View) setRune(x, y int, ch rune, fgColor, bgColor Attribute) error {
if x < 0 || x >= maxX || y < 0 || y >= maxY {
return errors.New("invalid point")
}
-
var (
ry, rcy int
err error
@@ -270,12 +269,19 @@ func (v *View) parseInput(ch rune) []cell {
if isEscape {
return nil
}
- c := cell{
- fgColor: v.ei.curFgColor,
- bgColor: v.ei.curBgColor,
- chr: ch,
+ repeatCount := 1
+ if ch == '\t' {
+ ch = ' '
+ repeatCount = 4
+ }
+ for i := 0; i < repeatCount; i++ {
+ c := cell{
+ fgColor: v.ei.curFgColor,
+ bgColor: v.ei.curBgColor,
+ chr: ch,
+ }
+ cells = append(cells, c)
}
- cells = append(cells, c)
}
return cells