From 655d3387283f85c55d4b2ec7ce9ed3d792f905f0 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 19 Sep 2022 12:35:02 +1000 Subject: Stop turning on change history when there are steps that can be undone as performing undo before start of change history can crash. --- src/CellBuffer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index be018bbd6..14b2e3212 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -1397,7 +1397,7 @@ void CellBuffer::PerformRedoStep() { void CellBuffer::ChangeHistorySet(bool set) { if (set) { - if (!changeHistory) { + if (!changeHistory && !uh.CanUndo()) { changeHistory = std::make_unique(Length()); } } else { -- cgit v1.2.3