diff --git a/addons/search/replace_matches.cpp b/addons/search/replace_matches.cpp --- a/addons/search/replace_matches.cpp +++ b/addons/search/replace_matches.cpp @@ -254,6 +254,10 @@ emit replaceStatus(doc->url()); } + // Make one transaction for the whole replace to speed up things + // and get all replacements in one "undo" + KTextEditor::Document::EditingTransaction transaction(doc); + // Create a vector of moving ranges for updating the tree-view after replace QVector matches; QVector replaced;