diff options
Diffstat (limited to 'vendor/github.com/jesseduffield/gocui/view.go')
-rw-r--r-- | vendor/github.com/jesseduffield/gocui/view.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go index 13826313f..c4df63ad7 100644 --- a/vendor/github.com/jesseduffield/gocui/view.go +++ b/vendor/github.com/jesseduffield/gocui/view.go @@ -1302,6 +1302,9 @@ func (v *View) SelectedLineIdx() int { // expected to only be used in tests func (v *View) SelectedLine() string { + v.writeMutex.Lock() + defer v.writeMutex.Unlock() + if len(v.lines) == 0 { return "" } |