OSDN Git Service

Fix osdn.net ticket 40407: Fix a problem where markers that are out of the range...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 13 May 2020 12:31:27 +0000 (21:31 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 13 May 2020 12:31:27 +0000 (21:31 +0900)
Externals/crystaledit/editlib/ccrystaltextview.h
Src/MergeEditView.cpp
Src/MergeEditView.h

index 78f31b3..e3a137a 100644 (file)
@@ -600,7 +600,7 @@ protected:
     //END SW
 
     std::vector<CrystalLineParser::TEXTBLOCK> MergeTextBlocks(const std::vector<CrystalLineParser::TEXTBLOCK>& blocks1, const std::vector<CrystalLineParser::TEXTBLOCK>& blocks2) const;
-    std::vector<CrystalLineParser::TEXTBLOCK> GetMarkerTextBlocks(int nLineIndex) const;
+    virtual std::vector<CrystalLineParser::TEXTBLOCK> GetMarkerTextBlocks(int nLineIndex) const;
     virtual std::vector<CrystalLineParser::TEXTBLOCK> GetAdditionalTextBlocks (int nLineIndex);
 
 public:
index 3158091..1203b86 100644 (file)
@@ -539,6 +539,16 @@ void CMergeEditView::OnActivateView(BOOL bActivate, CView* pActivateView, CView*
        pDoc->UpdateHeaderActivity(m_nThisPane, !!bActivate);
 }
 
+std::vector<CrystalLineParser::TEXTBLOCK> CMergeEditView::GetMarkerTextBlocks(int nLineIndex) const
+{
+       if (m_bDetailView)
+       {
+               if (nLineIndex < m_lineBegin || nLineIndex > m_lineEnd)
+                       return std::vector<CrystalLineParser::TEXTBLOCK>();
+       }
+       return CCrystalTextView::GetMarkerTextBlocks(nLineIndex);
+}
+
 std::vector<TEXTBLOCK> CMergeEditView::GetAdditionalTextBlocks (int nLineIndex)
 {
        static const std::vector<TEXTBLOCK> emptyBlocks;
index b6ca83e..d6293be 100644 (file)
@@ -138,6 +138,7 @@ public:
        void SelectArea(const CPoint & ptStart, const CPoint & ptEnd) { SetSelection(ptStart, ptEnd); } // make public
        using CGhostTextView::GetSelection;
        virtual void UpdateSiblingScrollPos (bool bHorz) override;
+    virtual std::vector<CrystalLineParser::TEXTBLOCK> GetMarkerTextBlocks(int nLineIndex) const;
        virtual std::vector<CrystalLineParser::TEXTBLOCK> GetAdditionalTextBlocks (int nLineIndex) override;
        virtual COLORREF GetColor(int nColorIndex) override;
        virtual void GetLineColors (int nLineIndex, COLORREF & crBkgnd,