Transaction: need to consume insert | delete properly.

pull/11/head
Blaž Hrastnik 4 years ago
parent b52474cf66
commit a74ff6bc03

@ -350,6 +350,8 @@ impl ChangeSet {
// a subsequent delete means a replace, consume it // a subsequent delete means a replace, consume it
if let Some(Delete(len)) = iter.peek() { if let Some(Delete(len)) = iter.peek() {
iter.next();
old_end = old_pos + len; old_end = old_pos + len;
// in range of replaced text // in range of replaced text
if old_end > pos { if old_end > pos {

Loading…
Cancel
Save