From 699c70ac91304078cdf4a8fee6d1737553f96606 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 23 Mar 2024 20:02:16 +1100 Subject: Add some missing ScopedEdition and fix redo tabs <-> space conversion functions did not create a ScopedEdition leading to uncommited modifications. Fixing this did fix the interactive error, but that error still existed in non interactive context so redo now considers there there is no redo child if there are uncommited modifiations (which is correct as this means we are currently creating a new leaf in the undo tree) Fixes #5124 --- src/normal.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index 03e7895c..2d80d26f 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1705,6 +1705,7 @@ void tabs_to_spaces(Context& context, NormalParams params) Vector tabs; Vector spaces; ScopedSelectionEdition selection_edition{context}; + ScopedEdition edition{context}; for (auto& sel : context.selections()) { for (auto it = buffer.iterator_at(sel.min()), @@ -1730,6 +1731,7 @@ void spaces_to_tabs(Context& context, NormalParams params) const ColumnCount tabstop = params.count == 0 ? opt_tabstop : params.count; Vector spaces; ScopedSelectionEdition selection_edition{context}; + ScopedEdition edition{context}; for (auto& sel : context.selections()) { for (auto it = buffer.iterator_at(sel.min()), -- cgit v1.2.3