diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-04-24 19:20:35 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-04-24 19:20:35 +1000 |
| commit | a4918f934ceb8c36ab398c0c973174ac17fc8600 (patch) | |
| tree | 6f512802af56abc72640e1d66a088ccf1f26433e /src/buffer_utils.cc | |
| parent | 7efcb94a5e4880ce3c3f911ab1f1ce9bb73b0b8c (diff) | |
| parent | e0d33f51b36c9f0be7ae2467dab455d211bbf561 (diff) | |
Merge remote-tracking branch 'occivink/undo-history-as-plain-list'
Diffstat (limited to 'src/buffer_utils.cc')
| -rw-r--r-- | src/buffer_utils.cc | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/buffer_utils.cc b/src/buffer_utils.cc index 47f9a88b..9ff1f4ce 100644 --- a/src/buffer_utils.cc +++ b/src/buffer_utils.cc @@ -301,14 +301,6 @@ void write_to_debug_buffer(StringView str) } -auto to_string(Buffer::HistoryId id) -{ - using Result = decltype(to_string(size_t{})); - if (id == Buffer::HistoryId::Invalid) - return Result{1, "-"}; - return to_string(static_cast<size_t>(id)); -} - static String modification_as_string(const Buffer::Modification& modification) { return format("{}{}.{}|{}", @@ -323,9 +315,7 @@ Vector<String> history_as_strings(const Vector<Buffer::HistoryNode>& history) for (auto& node : history) { auto seconds = std::chrono::duration_cast<std::chrono::seconds>(node.committed.time_since_epoch()); - res.push_back(to_string(node.parent)); res.push_back(to_string(seconds.count())); - res.push_back(to_string(node.redo_child)); for (auto& modification : node.undo_group) res.push_back(modification_as_string(modification)); }; |
