From f39367fc4c7af72caef8e20b1e9b1a038e242b0a Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 16 Feb 2024 09:52:43 +1100 Subject: Implement detach point access with SCI_SETUNDODETACH and SCI_GETUNDODETACH. Write more documentation for undo history. --- src/CellBuffer.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/CellBuffer.cxx') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 691a811dd..6dde7eb84 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -1160,12 +1160,12 @@ int CellBuffer::UndoSavePoint() const noexcept { return uh->SavePoint(); } -void CellBuffer::SetUndoCurrent(int action) { - uh->SetCurrent(action, Length()); +void CellBuffer::SetUndoDetach(int action) noexcept { + uh->SetDetachPoint(action); } -int CellBuffer::UndoCurrent() const noexcept { - return uh->Current(); +int CellBuffer::UndoDetach() const noexcept { + return uh->DetachPoint(); } void CellBuffer::SetUndoTentative(int action) noexcept { @@ -1176,6 +1176,14 @@ int CellBuffer::UndoTentative() const noexcept { return uh->TentativePoint(); } +void CellBuffer::SetUndoCurrent(int action) { + uh->SetCurrent(action, Length()); +} + +int CellBuffer::UndoCurrent() const noexcept { + return uh->Current(); +} + int CellBuffer::UndoActionType(int action) const noexcept { return uh->Type(action); } -- cgit v1.2.3