buffer: Lock the LineArray in case of modifications and export this lock

This commit is contained in:
Jöran Karl
2024-04-04 21:22:22 +02:00
parent 53d56d032c
commit 2830c4878e
2 changed files with 21 additions and 0 deletions

View File

@@ -1180,7 +1180,11 @@ func (b *Buffer) Retab() {
}
l = bytes.TrimLeft(l, " \t")
b.Lock()
b.lines[i].data = append(ws, l...)
b.Unlock()
b.MarkModified(i, i)
dirty = true
}