void CEditView::DamageView( int nLineStart, int nLineEnd ) { // collect the minimum damage m_nLineDamageStart = min( nLineStart, m_nLineDamageStart ); m_nLineDamageEnd = max( nLineEnd, m_nLineDamageEnd ); if ( m_nEditLevel == 0 ) { RepaintView( m_nLineDamageStart, m_nLineDamageEnd ); ResetDamage(); } }
void CEditView::OnEndEdit() { if ( --m_nEditLevel == 0 ) { // repaint any lines affected by the edits. // damage one line up from the start, because in the case of extended // selection where the topmost line selected is partially selected after // the end of the line (meaning no text in that line changed), a remnant // will be left behind since no buffer notifications were sent for that // line. // if color syntax is used, then must repaint all lines below the first, since a comment block spanning multiple rows may have // implicitly invalidated extra rows RecalcScrollInfo(); RepaintView( ( m_nLineDamageStart > 0 ) ? ( m_nLineDamageStart - 1 ) : m_nLineDamageStart, m_nLineDamageEnd ); // reset the damage ResetDamage(); } }
void ExISearch::SetState(IState s) { state = s; RepaintView(); }