summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-03-19 15:26:43 +1100
committerJesse Duffield <jessedduffield@gmail.com>2023-03-19 16:30:39 +1100
commitc28e25524afb5ed50389ebfe9838ba1bc0045465 (patch)
tree57a8bdbc4d6dc9c1b0a5ae27234b78a0894fe652 /vendor
parent73c7dc9c5d00408e156724ff5b9bd792b4d17273 (diff)
bump gocui to fix race condition
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go6
-rw-r--r--vendor/modules.txt2
2 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 7d0269dcb..f614da556 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -1124,6 +1124,9 @@ func (v *View) clearRunes() {
// BufferLines returns the lines in the view's internal
// buffer.
func (v *View) BufferLines() []string {
+ v.writeMutex.Lock()
+ defer v.writeMutex.Unlock()
+
lines := make([]string, len(v.lines))
for i, l := range v.lines {
str := lineType(l).String()
@@ -1142,6 +1145,9 @@ func (v *View) Buffer() string {
// ViewBufferLines returns the lines in the view's internal
// buffer that is shown to the user.
func (v *View) ViewBufferLines() []string {
+ v.writeMutex.Lock()
+ defer v.writeMutex.Unlock()
+
lines := make([]string, len(v.viewLines))
for i, l := range v.viewLines {
str := lineType(l.line).String()
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 9a262de20..b62cafde7 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.20230314081453-8d2162479b92
+# github.com/jesseduffield/gocui v0.3.1-0.20230319043340-e793609bfbf5
## explicit; go 1.12
github.com/jesseduffield/gocui
# github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10