diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-10-03 09:23:24 -0700 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-10-03 09:29:41 -0700 |
commit | e3f21f058879e9c42540a033630a5857808db47f (patch) | |
tree | 3d1ce10f7220fbdc895af06ed65a10456ed2439b /vendor/github.com | |
parent | 3375cc1b3dc347c3359977b3b2c8c9c98eddeff2 (diff) |
strip NUL bytes instead of replacing with space
Diffstat (limited to 'vendor/github.com')
-rw-r--r-- | vendor/github.com/jesseduffield/gocui/view.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |