From 3bda838ca3a8e6d6d04c9b664fc105d085ef58c8 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sun, 9 May 2021 11:09:39 +0900 Subject: [PATCH] Fix the problem that the BS key does not work at the beginning of the line after splitting the pane or clicking the OK button in the Options dialog. --- Externals/crystaledit/editlib/ccrystaleditview.cpp | 12 ++++++++++++ Externals/crystaledit/editlib/ccrystaleditview.h | 2 ++ Src/MergeEditView.cpp | 10 ++++++++++ Src/MergeEditView.h | 4 ++++ 4 files changed, 28 insertions(+) diff --git a/Externals/crystaledit/editlib/ccrystaleditview.cpp b/Externals/crystaledit/editlib/ccrystaleditview.cpp index f532f55ca..6f62b2767 100644 --- a/Externals/crystaledit/editlib/ccrystaleditview.cpp +++ b/Externals/crystaledit/editlib/ccrystaleditview.cpp @@ -1752,6 +1752,18 @@ SetDisableBSAtSOL (bool bDisableBSAtSOL) } void CCrystalEditView:: +CopyProperties (CCrystalTextView* pSource) +{ + CCrystalTextView::CopyProperties(pSource); + auto pSourceEditView = dynamic_cast(pSource); + if (!pSourceEditView) + return; + m_bDisableBSAtSOL = pSourceEditView->m_bDisableBSAtSOL; + m_bOvrMode = pSourceEditView->m_bOvrMode; + m_bAutoIndent = pSourceEditView->m_bAutoIndent; +} + +void CCrystalEditView:: OnEditRedo () { DoEditRedo(); diff --git a/Externals/crystaledit/editlib/ccrystaleditview.h b/Externals/crystaledit/editlib/ccrystaleditview.h index 70e00e7c8..cd54fe957 100644 --- a/Externals/crystaledit/editlib/ccrystaleditview.h +++ b/Externals/crystaledit/editlib/ccrystaleditview.h @@ -103,6 +103,8 @@ public : void SetDisableBSAtSOL (bool bDisableBSAtSOL); bool GetDisableBSAtSOL () const; + void CopyProperties (CCrystalTextView* pSource) override; + // Operations public : CCrystalEditView (); diff --git a/Src/MergeEditView.cpp b/Src/MergeEditView.cpp index aa307c4a1..b6fc7558a 100644 --- a/Src/MergeEditView.cpp +++ b/Src/MergeEditView.cpp @@ -269,6 +269,15 @@ CCrystalTextBuffer *CMergeEditView::LocateTextBuffer() return GetDocument()->m_ptBuf[m_nThisPane].get(); } +void CMergeEditView::CopyProperties(CCrystalTextView* pSource) +{ + __super::CopyProperties(pSource); + auto pSourceEditView = dynamic_cast(pSource); + if (!pSourceEditView) + return; + m_bChangedSchemeManually = pSourceEditView->m_bChangedSchemeManually; +} + /** * @brief Update any resources necessary after a GUI language change */ @@ -3483,6 +3492,7 @@ void CMergeEditView::RefreshOptions() SetTextType(def->type); else SetTextType(CrystalLineParser::SRC_PLAIN); + SetDisableBSAtSOL(false); } SetWordWrapping(GetOptionsMgr()->GetBool(OPT_WORDWRAP)); diff --git a/Src/MergeEditView.h b/Src/MergeEditView.h index d7efe29cf..1a0904d84 100644 --- a/Src/MergeEditView.h +++ b/Src/MergeEditView.h @@ -92,6 +92,10 @@ private: bool m_bChangedSchemeManually; /**< `true` if the syntax highlighting scheme is changed manually */ +// Attributes +public: + void CopyProperties (CCrystalTextView* pSource) override; + // Operations public: void RefreshOptions(); -- 2.11.0