diff options
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 6 |
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 { |