aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.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/Document.cxx
parent07a7683902feb4b9944394b9378f0a1a51972497 (diff)
downloadscintilla-mirror-bd53ffcbefe4e7a22fc493b1916939bae5f9dc1d.tar.gz
Implement API to read and write undo history from applications.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 306cdb725..52081e1cd 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -351,6 +351,54 @@ void Document::TentativeUndo() {
}
}
+int Document::UndoActions() const noexcept {
+ return cb.UndoActions();
+}
+
+void Document::SetUndoSavePoint(int action) noexcept {
+ cb.SetUndoSavePoint(action);
+}
+
+int Document::UndoSavePoint() const noexcept {
+ return cb.UndoSavePoint();
+}
+
+void Document::SetUndoCurrent(int action) noexcept {
+ cb.SetUndoCurrent(action);
+}
+
+int Document::UndoCurrent() const noexcept {
+ return cb.UndoCurrent();
+}
+
+void Document::SetUndoTentative(int action) noexcept {
+ cb.SetUndoTentative(action);
+}
+
+int Document::UndoTentative() const noexcept {
+ return cb.UndoTentative();
+}
+
+int Document::UndoActionType(int action) const noexcept {
+ return cb.UndoActionType(action);
+}
+
+Sci::Position Document::UndoActionPosition(int action) const noexcept {
+ return cb.UndoActionPosition(action);
+}
+
+std::string_view Document::UndoActionText(int action) const noexcept {
+ return cb.UndoActionText(action);
+}
+
+void Document::PushUndoActionType(int type, Sci::Position position) {
+ cb.PushUndoActionType(type, position);
+}
+
+void Document::ChangeLastUndoActionText(size_t length, const char *text) {
+ cb.ChangeLastUndoActionText(length, text);
+}
+
int Document::GetMark(Sci::Line line, bool includeChangeHistory) const {
int marksHistory = 0;
if (includeChangeHistory && (line < LinesTotal())) {