diff --git a/cmd/micro/buffer.go b/cmd/micro/buffer.go index 67a6c73b..db207338 100644 --- a/cmd/micro/buffer.go +++ b/cmd/micro/buffer.go @@ -349,6 +349,14 @@ func (b *Buffer) MergeCursors() { } b.cursors = cursors + + for i := range b.cursors { + b.cursors[i].Num = i + } + + if b.curCursor >= len(b.cursors) { + b.curCursor = len(b.cursors) - 1 + } } func (b *Buffer) UpdateCursors() {