Hi Aric,
Just a suggestion:
@@ -1818,6 +1818,7 @@ static void EDIT_ML_InvalidateText(EDITSTATE *es, INT start, INT end) RECT rcUpdate; INT l;
+ if (vlc == 0) vlc = 1; if ((el < es->y_offset) || (sl > es->y_offset + vlc)) return;
@@ -2235,6 +2236,7 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev)
if (es->style & ES_MULTILINE) { INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + if (vlc == 0) vlc = 1;
rather than having to introduce the correction in every place it's used, replacing the initialization of vlc with a call to an inline function would reduce the new lines of code (and the probability of future error.) --Juan
Great idea, patch resubmitted. -aric
Juan Lang wrote:
Hi Aric,
Just a suggestion:
@@ -1818,6 +1818,7 @@ static void EDIT_ML_InvalidateText(EDITSTATE *es, INT start, INT end) RECT rcUpdate; INT l;
- if (vlc == 0) vlc = 1; if ((el < es->y_offset) || (sl > es->y_offset + vlc)) return;
@@ -2235,6 +2236,7 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev)
if (es->style & ES_MULTILINE) { INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height;
if (vlc == 0) vlc = 1;
rather than having to introduce the correction in every place it's used, replacing the initialization of vlc with a call to an inline function would reduce the new lines of code (and the probability of future error.) --Juan