From: boca4711 <boc...@us...> - 2005-05-08 11:06:48
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6511 Modified Files: ScintillaEx.cpp ScintillaEx.h Log Message: Add: GetEOLString returns string with CR+LF, CR or LF Fix: HighlightBraces resets highlight guides Index: ScintillaEx.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ScintillaEx.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ScintillaEx.cpp 17 Apr 2005 12:34:52 -0000 1.24 --- ScintillaEx.cpp 8 May 2005 11:06:38 -0000 1.25 *************** *** 245,250 **** if(match == INVALID_POSITION) { - BraceHighlight(-1, -1); BraceBadLight(nPos); } else --- 245,250 ---- if(match == INVALID_POSITION) { BraceBadLight(nPos); + SetHighlightGuide(0); } else *************** *** 1968,1969 **** --- 1968,1991 ---- return nLine; } + + /// Get EOL string of current or given EOL mode + CString CScintillaEx::GetEOLString(int nEOLMode) + { + int nMode = nEOLMode; + if (nEOLMode == NULL) + nMode = GetEOLMode(); + + switch (nMode){ + case SC_EOL_CR: + return _T("\r"); + break; + case SC_EOL_LF: + return _T("\n"); + break; + case SC_EOL_CRLF: + return _T("\r\n"); + break; + } + // Should not be reached + return _T(""); + } Index: ScintillaEx.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ScintillaEx.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ScintillaEx.h 17 Apr 2005 12:34:52 -0000 1.16 --- ScintillaEx.h 8 May 2005 11:06:38 -0000 1.17 *************** *** 154,157 **** --- 154,158 ---- std::deque<int> dqBookmarks; public: + CString GetEOLString(int nEOLMode = NULL); int GetSelectionEndLine(void); int GetSelectionStartLine(void); |