aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2024-02-09 21:45:35 +1100
committerNeil <nyamatongwe@gmail.com>2024-02-09 21:45:35 +1100
commitbd53ffcbefe4e7a22fc493b1916939bae5f9dc1d (patch)
treebfe435d75b222d464a9cbb21e25583d33c591936 /src/CellBuffer.cxx
parent07a7683902feb4b9944394b9378f0a1a51972497 (diff)
downloadscintilla-mirror-bd53ffcbefe4e7a22fc493b1916939bae5f9dc1d.tar.gz
Implement API to read and write undo history from applications.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index bfef83da5..b3111914e 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -1148,6 +1148,54 @@ void CellBuffer::PerformRedoStep() {
uh->CompletedRedoStep();
}
+int CellBuffer::UndoActions() const noexcept {
+ return uh->Actions();
+}
+
+void CellBuffer::SetUndoSavePoint(int action) noexcept {
+ uh->SetSavePoint(action);
+}
+
+int CellBuffer::UndoSavePoint() const noexcept {
+ return uh->SavePoint();
+}
+
+void CellBuffer::SetUndoCurrent(int action) noexcept {
+ uh->SetCurrent(action);
+}
+
+int CellBuffer::UndoCurrent() const noexcept {
+ return uh->Current();
+}
+
+void CellBuffer::SetUndoTentative(int action) noexcept {
+ uh->SetTentative(action);
+}
+
+int CellBuffer::UndoTentative() const noexcept {
+ return uh->TentativePoint();
+}
+
+int CellBuffer::UndoActionType(int action) const noexcept {
+ return uh->Type(action);
+}
+
+Sci::Position CellBuffer::UndoActionPosition(int action) const noexcept {
+ return uh->Position(action);
+}
+
+std::string_view CellBuffer::UndoActionText(int action) const noexcept {
+ return uh->Text(action);
+}
+
+void CellBuffer::PushUndoActionType(int type, Sci::Position position) {
+ uh->PushUndoActionType(type, position);
+}
+
+void CellBuffer::ChangeLastUndoActionText(size_t length, const char *text) {
+ uh->ChangeLastUndoActionText(length, text);
+}
+
void CellBuffer::ChangeHistorySet(bool set) {
if (set) {
if (!changeHistory && !uh->CanUndo()) {