diff --git a/src/selection.cc b/src/selection.cc index 24793b2c..1d4e1765 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -69,6 +69,9 @@ static void update_iterator(const Modification& modification, iterator = modification.position; else iterator -= length; + + if (iterator.is_end()) + --iterator; } else {