aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2022-09-19 12:35:02 +1000
committerNeil <nyamatongwe@gmail.com>2022-09-19 12:35:02 +1000
commit655d3387283f85c55d4b2ec7ce9ed3d792f905f0 (patch)
treecb7dc491b350718f8cde59a93b1dcf3531c61c9f /src/CellBuffer.cxx
parentbbd334b945e8e5543117e3f6b172ac81d1101b64 (diff)
downloadscintilla-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.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx2
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 {