mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-20 07:47:15 +09:00
buffer: Lock the LineArray in case of modifications and export this lock
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user