OSDN Git Service

Fix the problem that the BS key does not work at the beginning of the line after...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 9 May 2021 02:09:39 +0000 (11:09 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 9 May 2021 02:09:39 +0000 (11:09 +0900)
Externals/crystaledit/editlib/ccrystaleditview.cpp
Externals/crystaledit/editlib/ccrystaleditview.h
Src/MergeEditView.cpp
Src/MergeEditView.h

index f532f55..6f62b27 100644 (file)
@@ -1752,6 +1752,18 @@ SetDisableBSAtSOL (bool bDisableBSAtSOL)
 }
 
 void CCrystalEditView::
+CopyProperties (CCrystalTextView* pSource)
+{
+  CCrystalTextView::CopyProperties(pSource);
+  auto pSourceEditView = dynamic_cast<decltype(this)>(pSource);
+  if (!pSourceEditView)
+      return;
+  m_bDisableBSAtSOL = pSourceEditView->m_bDisableBSAtSOL;
+  m_bOvrMode = pSourceEditView->m_bOvrMode;
+  m_bAutoIndent = pSourceEditView->m_bAutoIndent;
+}
+
+void CCrystalEditView::
 OnEditRedo ()
 {
   DoEditRedo();
index 70e00e7..cd54fe9 100644 (file)
@@ -103,6 +103,8 @@ public :
     void SetDisableBSAtSOL (bool bDisableBSAtSOL);
     bool GetDisableBSAtSOL () const;
 
+    void CopyProperties (CCrystalTextView* pSource) override;
+
     // Operations
 public :
     CCrystalEditView ();
index aa307c4..b6fc755 100644 (file)
@@ -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<decltype(this)>(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));
index d7efe29..1a0904d 100644 (file)
@@ -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();