mirror of
https://github.com/jroimartin/gocui.git
synced 2025-04-28 13:48:51 +08:00
add write mutex to editor
This commit is contained in:
parent
20cddf8f54
commit
5a8b8cb853
3
edit.go
3
edit.go
@ -341,6 +341,9 @@ func (v *View) moveCursor(dx, dy int, writeMode bool) {
|
||||
// buffer is increased if the point is out of bounds. Overwrite mode is
|
||||
// governed by the value of View.overwrite.
|
||||
func (v *View) writeRune(x, y int, ch rune) error {
|
||||
v.writeMutex.Lock()
|
||||
defer v.writeMutex.Unlock()
|
||||
|
||||
v.tainted = true
|
||||
|
||||
x, y, err := v.realPosition(x, y)
|
||||
|
Loading…
x
Reference in New Issue
Block a user