OSDN Git Service

crystaledit: Use GetProfile*()/WriteProfile*() to read and write the registry wheneve...
[winmerge-jp/winmerge-jp.git] / Src / GhostTextBuffer.h
index e60d9fa..7751e7a 100644 (file)
@@ -74,9 +74,10 @@ public :
        */
        virtual void GetTextWithoutEmptys (int nStartLine, int nStartChar,
                        int nEndLine, int nEndChar, CString &text,
-                       CRLFSTYLE nCrlfStyle =CRLF_STYLE_AUTOMATIC,
+                       CRLFSTYLE nCrlfStyle =CRLFSTYLE::AUTOMATIC,
                        bool bExcludeInvisibleLines = true) const override;
 
+       virtual bool IsIndentableLine(int nLine) const override { return (GetLineFlags(nLine) & LF_GHOST) == 0; }
 
        // Text modification functions
        virtual bool InsertText (CCrystalTextView * pSource, int nLine, int nPos,
@@ -90,7 +91,7 @@ public :
 #endif
 
        virtual void AddUndoRecord (bool bInsert, const CPoint & ptStartPos, const CPoint & ptEndPos,
-                                   LPCTSTR pszText, size_t cchText, int nActionType = CE_ACTION_UNKNOWN, CDWordArray *paSavedRevisionNumbers = NULL) override;
+                                   LPCTSTR pszText, size_t cchText, int nActionType = CE_ACTION_UNKNOWN, CDWordArray *paSavedRevisionNumbers = nullptr) override;
        virtual UndoRecord GetUndoRecord(int nUndoPos) const override;
        virtual bool UndoInsert(CCrystalTextView * pSource, CPoint & ptCursorPos,
                                                        const CPoint apparent_ptStartPos, CPoint const apparent_ptEndPos, const UndoRecord & ur) override;
@@ -125,6 +126,7 @@ public:
 
 private:
        void RecomputeRealityMapping();
+       void CountEolAndLastLineLength(const CPoint& ptStartPos, LPCTSTR pszText, size_t cchText, int& nLastLineLength, int& nEol);
        /** For debugging purpose */
        void checkFlagsFromReality() const;