summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-10-03 09:23:24 -0700
committerJesse Duffield <jessedduffield@gmail.com>2022-10-03 09:29:41 -0700
commite3f21f058879e9c42540a033630a5857808db47f (patch)
tree3d1ce10f7220fbdc895af06ed65a10456ed2439b
parent3375cc1b3dc347c3359977b3b2c8c9c98eddeff2 (diff)
strip NUL bytes instead of replacing with space
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--pkg/integration/tests/custom_commands/menu_from_command.go4
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go6
-rw-r--r--vendor/modules.txt2
5 files changed, 9 insertions, 9 deletions
diff --git a/go.mod b/go.mod
index 57baf958b..cb746383c 100644
--- a/go.mod
+++ b/go.mod
@@ -18,7 +18,7 @@ require (
github.com/integrii/flaggy v1.4.0
github.com/jesseduffield/generics v0.0.0-20220320043834-727e535cbe68
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4
- github.com/jesseduffield/gocui v0.3.1-0.20221003033055-3b1444b7ce1c
+ github.com/jesseduffield/gocui v0.3.1-0.20221003162644-fead10f7b360
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
github.com/jesseduffield/yaml v2.1.0+incompatible
diff --git a/go.sum b/go.sum
index fea88fbd6..f75d64c9e 100644
--- a/go.sum
+++ b/go.sum
@@ -72,8 +72,8 @@ github.com/jesseduffield/generics v0.0.0-20220320043834-727e535cbe68 h1:EQP2Tv8T
github.com/jesseduffield/generics v0.0.0-20220320043834-727e535cbe68/go.mod h1:+LLj9/WUPAP8LqCchs7P+7X0R98HiFujVFANdNaxhGk=
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4 h1:GOQrmaE8i+KEdB8NzAegKYd4tPn/inM0I1uo0NXFerg=
github.com/jesseduffield/go-git/v5 v5.1.2-0.20201006095850-341962be15a4/go.mod h1:nGNEErzf+NRznT+N2SWqmHnDnF9aLgANB1CUNEan09o=
-github.com/jesseduffield/gocui v0.3.1-0.20221003033055-3b1444b7ce1c h1:mbOoXlqOzc243zNV71pDxeiEof8IRRw2ZJzVXm/RLjc=
-github.com/jesseduffield/gocui v0.3.1-0.20221003033055-3b1444b7ce1c/go.mod h1:znJuCDnF2Ph40YZSlBwdX/4GEofnIoWLGdT4mK5zRAU=
+github.com/jesseduffield/gocui v0.3.1-0.20221003162644-fead10f7b360 h1:43F6SAmNzsjwhNa7hBfYCXUgPSl76b+3IogJIloMDnU=
+github.com/jesseduffield/gocui v0.3.1-0.20221003162644-fead10f7b360/go.mod h1:znJuCDnF2Ph40YZSlBwdX/4GEofnIoWLGdT4mK5zRAU=
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10 h1:jmpr7KpX2+2GRiE91zTgfq49QvgiqB0nbmlwZ8UnOx0=
github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10/go.mod h1:aA97kHeNA+sj2Hbki0pvLslmE4CbDyhBeSSTUUnOuVo=
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e h1:uw/oo+kg7t/oeMs6sqlAwr85ND/9cpO3up3VxphxY0U=
diff --git a/pkg/integration/tests/custom_commands/menu_from_command.go b/pkg/integration/tests/custom_commands/menu_from_command.go
index 765f7b873..f45d820d6 100644
--- a/pkg/integration/tests/custom_commands/menu_from_command.go
+++ b/pkg/integration/tests/custom_commands/menu_from_command.go
@@ -55,9 +55,9 @@ var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{
assert.InMenu()
assert.MatchCurrentViewTitle(Equals("Choose commit message"))
- assert.MatchSelectedLine(Equals("baz ")) // TODO: remove the trailing space
+ assert.MatchSelectedLine(Equals("baz"))
input.NextItem()
- assert.MatchSelectedLine(Equals("bar ")) // TODO: remove the trailing space
+ assert.MatchSelectedLine(Equals("bar"))
input.Confirm()
assert.InPrompt()
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index b3e21a0e0..ea6923781 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -1080,7 +1080,7 @@ func (v *View) BufferLines() []string {
lines := make([]string, len(v.lines))
for i, l := range v.lines {
str := lineType(l).String()
- str = strings.Replace(str, "\x00", " ", -1)
+ str = strings.Replace(str, "\x00", "", -1)
lines[i] = str
}
return lines
@@ -1098,7 +1098,7 @@ func (v *View) ViewBufferLines() []string {
lines := make([]string, len(v.viewLines))
for i, l := range v.viewLines {
str := lineType(l.line).String()
- str = strings.Replace(str, "\x00", " ", -1)
+ str = strings.Replace(str, "\x00", "", -1)
lines[i] = str
}
return lines
@@ -1274,7 +1274,7 @@ func (v *View) SelectedLine() string {
}
line := v.lines[v.SelectedLineIdx()]
str := lineType(line).String()
- return strings.Replace(str, "\x00", " ", -1)
+ return strings.Replace(str, "\x00", "", -1)
}
func (v *View) SelectedPoint() (int, int) {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index c37a93336..a829719fd 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -172,7 +172,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
-# github.com/jesseduffield/gocui v0.3.1-0.20221003033055-3b1444b7ce1c
+# github.com/jesseduffield/gocui v0.3.1-0.20221003162644-fead10f7b360
## explicit; go 1.12
github.com/jesseduffield/gocui
# github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10