mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-26 02:17:05 +09:00
Clear cursors before performing undo or redo
This fix isn't ideal because it removes the cursors but it does work Fixes #798
This commit is contained in:
@@ -562,3 +562,12 @@ func (b *Buffer) ClearMatches() {
|
||||
b.SetState(i, nil)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) clearCursors() {
|
||||
for i := 1; i < len(b.cursors); i++ {
|
||||
b.cursors[i] = nil
|
||||
}
|
||||
b.cursors = b.cursors[:1]
|
||||
b.UpdateCursors()
|
||||
b.Cursor.ResetSelection()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user