ASSERT(nStartChar >= 0 && nStartChar <= GetLineLength(nStartLine));
ASSERT(nEndLine >= 0 && nEndLine < lines);
ASSERT(nEndChar >= 0 && nEndChar <= GetFullLineLength(nEndLine));
- ASSERT(nStartLine < nEndLine || nStartLine == nEndLine &&
- nStartChar < nEndChar);
+ ASSERT(nStartLine < nEndLine || nStartLine == nEndLine && nStartChar <= nEndChar);
+ // some edit functions (copy...) should do nothing when there is no selection.
+ // assert to be sure to catch these 'do nothing' cases.
+ ASSERT(nStartLine != nEndLine || nStartChar != nEndChar);
// estimate size (upper bound)
int nBufSize = 0;
ASSERT (nStartChar >= 0 && nStartChar <= m_aLines[nStartLine].m_nLength);
ASSERT (nEndLine >= 0 && nEndLine < m_aLines.GetSize ());
ASSERT (nEndChar >= 0 && nEndChar <= m_aLines[nEndLine].m_nLength);
- ASSERT (nStartLine < nEndLine || nStartLine == nEndLine && nStartChar < nEndChar);
+ ASSERT (nStartLine < nEndLine || nStartLine == nEndLine && nStartChar <= nEndChar);
+ // some edit functions (copy...) should do nothing when there is no selection.
+ // assert to be sure to catch these 'do nothing' cases.
+ ASSERT (nStartLine != nEndLine || nStartChar != nEndChar);
if (pszCRLF == NULL)
pszCRLF = crlf;
ASSERT (nStartChar >= 0 && nStartChar <= m_aLines[nStartLine].m_nLength);
ASSERT (nEndLine >= 0 && nEndLine < m_aLines.GetSize ());
ASSERT (nEndChar >= 0 && nEndChar <= m_aLines[nEndLine].m_nLength);
- ASSERT (nStartLine < nEndLine || nStartLine == nEndLine && nStartChar < nEndChar);
+ ASSERT (nStartLine < nEndLine || nStartLine == nEndLine && nStartChar <= nEndChar);
+ // some edit functions (delete...) should do nothing when there is no selection.
+ // assert to be sure to catch these 'do nothing' cases.
+ ASSERT (nStartLine != nEndLine || nStartChar != nEndChar);
if (m_bReadOnly)
return FALSE;
WinMerge: MainFrm.cpp
2003-11-13 Laoran
+ modify the assert in GetText/GetTextWithoutEmptys
+ submitted by Jochen
+ WinMerge: GhostTextBuffer.cpp
+ editlib: ccrystaltextbuffer.cpp
Merging lwdisp.c with Jochen's changes (see patch #837480)
common: lwdisp.c lwdisp.h
PATCH: [ 838354 ] Revisit Speedup Speed up display of large differences