From d238707e6df9ee0aa91712df3d5aa0fd34e4b2bf Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 30 Apr 2013 19:01:10 +0200 Subject: [PATCH] Fix UndoGroupOptimizer --- src/buffer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/buffer.cc b/src/buffer.cc index 068bf55f..14507528 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -348,6 +348,7 @@ class UndoGroupOptimizer { ByteCount overlaps_len = it->content.length() - pos; it->content = it->content.substr(0, pos); + it_next->coord = advance(it_next->coord, it_next->content.substr(0, overlaps_len)); it_next->content = it_next->content.substr(overlaps_len); ++it, ++it_next; progress = true;