aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2025-02-04 20:57:26 +1100
committerNeil <nyamatongwe@gmail.com>2025-02-04 20:57:26 +1100
commit3c7b3d58881b98806a0eb5bbd94a07c38b9fe7c5 (patch)
tree84bfcce4cd245c333cab38586f43be89e8c7259f /src/Document.cxx
parentc88990bc3bd3e043a426773d24d55a7527e84dcf (diff)
downloadscintilla-mirror-3c7b3d58881b98806a0eb5bbd94a07c38b9fe7c5.tar.gz
Ensure undo selection history for view is deleted when view destroyed or
history disabled.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index dc82b1902..7543b4940 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -2615,7 +2615,11 @@ void Document::SetLexInterface(std::unique_ptr<LexInterface> pLexInterface) noex
}
void Document::SetViewState(void *view, ViewStateShared pVSS) {
- viewData[view] = pVSS;
+ if (pVSS) {
+ viewData[view] = pVSS;
+ } else {
+ viewData.erase(view);
+ }
}
ViewStateShared Document::GetViewState(void *view) const noexcept {