From 1cccf5165b891eb95c85932474bb872ab0fbe638 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 28 Jul 2024 09:48:13 +1000 Subject: Add SCI_GETUNDOSEQUENCE to determine whether an undo sequence is active and its nesting depth. --- src/CellBuffer.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/CellBuffer.cxx') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index b0b9d9c39..4985517e0 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -1070,6 +1070,10 @@ void CellBuffer::EndUndoAction() noexcept { uh->EndUndoAction(); } +int CellBuffer::UndoSequenceDepth() const noexcept { + return uh->UndoSequenceDepth(); +} + void CellBuffer::AddUndoAction(Sci::Position token, bool mayCoalesce) { bool startSequence = false; uh->AppendAction(ActionType::container, token, nullptr, 0, startSequence, mayCoalesce); -- cgit v1.2.3