From bd53ffcbefe4e7a22fc493b1916939bae5f9dc1d Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 9 Feb 2024 21:45:35 +1100 Subject: Implement API to read and write undo history from applications. --- src/CellBuffer.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/CellBuffer.h') diff --git a/src/CellBuffer.h b/src/CellBuffer.h index 16ed14d6c..5422e92aa 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -180,6 +180,19 @@ public: Action GetRedoStep() const noexcept; void PerformRedoStep(); + int UndoActions() const noexcept; + void SetUndoSavePoint(int action) noexcept; + int UndoSavePoint() const noexcept; + void SetUndoCurrent(int action) noexcept; + int UndoCurrent() const noexcept; + void SetUndoTentative(int action) noexcept; + int UndoTentative() const noexcept; + int UndoActionType(int action) const noexcept; + Sci::Position UndoActionPosition(int action) const noexcept; + std::string_view UndoActionText(int action) const noexcept; + void PushUndoActionType(int type, Sci::Position position); + void ChangeLastUndoActionText(size_t length, const char *text); + void ChangeHistorySet(bool set); [[nodiscard]] int EditionAt(Sci::Position pos) const noexcept; [[nodiscard]] Sci::Position EditionEndRun(Sci::Position pos) const noexcept; -- cgit v1.2.3