+ // ScrollToLine() will update the scrollbar itself if it changes the line
+ // we pass to it because it's out of [new] range
+ size_t oldScrollPos = m_lineFirst;
+ ScrollToLine(m_lineFirst);
+ if ( oldScrollPos == m_lineFirst )
+ {
+ // but if it didn't do it, we still need to update the scrollbar to
+ // reflect the changed number of lines ourselves
+ UpdateScrollbar();
+ }