Remove RCLocalizationHelper plugin (#2029457)
Clarify Supercopier caused hang in release notes (#2030040)
Improve tree mode in folder compare (#2018836)
+ Unlimited undo (#2033754)
BugFix: Could change syntax highlight mode when highlighting was
disabled from options (#2027325)
BugFix: Editing line filters updated wrong filter (#2025130)
#define CHAR_ALIGN 16
#define ALIGN_BUF_SIZE(size) ((size) / CHAR_ALIGN) * CHAR_ALIGN + CHAR_ALIGN;
-#define UNDO_BUF_SIZE 1024
-
const TCHAR crlf[] = _T ("\r\n");
#ifdef _DEBUG
m_nTabSize = 4;
m_nSyncPosition = m_nUndoPosition = 0;
m_bUndoGroup = m_bUndoBeginGroup = FALSE;
- m_nUndoBufSize = UNDO_BUF_SIZE;
ASSERT (m_aUndoBuf.GetSize () == 0);
UpdateViews (NULL, NULL, UPDATE_RESET);
//BEGIN SW
m_aUndoBuf.SetSize (m_nUndoPosition);
}
- // If undo buffer size is close to critical, remove the oldest records
- ASSERT (m_aUndoBuf.GetSize () <= m_nUndoBufSize);
- nBufSize = (int) m_aUndoBuf.GetSize ();
- if (nBufSize >= m_nUndoBufSize)
- {
- int nIndex = 0;
- for (;;)
- {
- nIndex++;
- if (nIndex == nBufSize || (m_aUndoBuf[nIndex].m_dwFlags & UNDO_BEGINGROUP) != 0)
- break;
- }
- m_aUndoBuf.RemoveAt (0, nIndex);
-
-//<jtuc 2003-06-28>
-//- Keep m_nSyncPosition in sync.
-//- Ensure first undo record is flagged UNDO_BEGINGROUP since part of the code
-// relies on this condition.
- if (m_nSyncPosition >= 0)
- {
- m_nSyncPosition -= nIndex; // çà c'est bien...mais non, test inutile ? Ou Apres !
- }
- if (nIndex < nBufSize)
- {
- // Not really necessary as long as groups are discarded as a whole.
- // Just in case some day the loop above should be changed to limit
- // the number of discarded undo records to some reasonable value...
- m_aUndoBuf[0].m_dwFlags |= UNDO_BEGINGROUP; // çà c'est sale
- }
- else
- {
- // No undo records left - begin a new group:
- m_bUndoBeginGroup = TRUE;
- }
-//</jtuc>
-
- }
- ASSERT (m_aUndoBuf.GetSize () < m_nUndoBufSize);
-
// Add new record
SUndoRecord ur;
ur.m_dwFlags = bInsert ? UNDO_INSERT : 0;
m_aUndoBuf.Add (ur);
m_nUndoPosition = (int) m_aUndoBuf.GetSize ();
-
- ASSERT (m_aUndoBuf.GetSize () <= m_nUndoBufSize);
}
LPCTSTR CCrystalTextBuffer::GetStringEol(CRLFSTYLE nCRLFMode)