Move cursor selections on Insert or Remove

Ref #715
This commit is contained in:
Zachary Yedidia
2017-06-25 19:14:01 -04:00
parent 3a02ad8664
commit 8f4820ba28
2 changed files with 25 additions and 11 deletions

View File

@@ -316,7 +316,7 @@ func (b *Buffer) MergeCursors() {
if c1 != nil {
for j := 0; j < len(b.cursors); j++ {
c2 := b.cursors[j]
if i != j && c1.Loc == c2.Loc {
if c2 != nil && i != j && c1.Loc == c2.Loc {
b.cursors[j] = nil
}
}