diff options
author | Neil <nyamatongwe@gmail.com> | 2022-09-19 12:35:02 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-09-19 12:35:02 +1000 |
commit | 655d3387283f85c55d4b2ec7ce9ed3d792f905f0 (patch) | |
tree | cb7dc491b350718f8cde59a93b1dcf3531c61c9f | |
parent | bbd334b945e8e5543117e3f6b172ac81d1101b64 (diff) | |
download | scintilla-mirror-655d3387283f85c55d4b2ec7ce9ed3d792f905f0.tar.gz |
Stop turning on change history when there are steps that can be undone as
performing undo before start of change history can crash.
-rw-r--r-- | src/CellBuffer.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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<ChangeHistory>(Length()); } } else { |