diff options
| author | Maxime Coste <mawww@kakoune.org> | 2024-03-23 20:02:16 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-03-23 20:07:41 +1100 |
| commit | 699c70ac91304078cdf4a8fee6d1737553f96606 (patch) | |
| tree | e83a59ff972d54f9026e70c901e7c2e867d67e43 /src/normal.cc | |
| parent | 6e4bb5fbc5bc01c9143e40e3f4cb5b48efb020ec (diff) | |
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
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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<Selection> tabs; Vector<String> 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<Selection> spaces; ScopedSelectionEdition selection_edition{context}; + ScopedEdition edition{context}; for (auto& sel : context.selections()) { for (auto it = buffer.iterator_at(sel.min()), |
