Fix update region calculation for the case where a word wraps up to
the previous line.
This commit is contained in:
parent
32e3d89947
commit
a935c2afd2
|
@ -1125,7 +1125,8 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
|
|||
es->tabs_count, es->tabs));
|
||||
|
||||
/* FIXME: check here for lines that are too wide even in AUTOHSCROLL (> 32767 ???) */
|
||||
if ((!(es->style & ES_AUTOHSCROLL)) && (current_line->width > fw)) {
|
||||
if (!(es->style & ES_AUTOHSCROLL)) {
|
||||
if (current_line->width > fw) {
|
||||
INT next = 0;
|
||||
INT prev;
|
||||
do {
|
||||
|
@ -1168,6 +1169,17 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
|
|||
current_line->width = (INT)LOWORD(GetTabbedTextExtentW(dc, current_position,
|
||||
current_line->net_length, es->tabs_count, es->tabs));
|
||||
}
|
||||
else if (orig_net_length < current_line->net_length &&
|
||||
current_line == start_line &&
|
||||
current_line->index != nstart_index) {
|
||||
/* The previous line expanded but it's still not as wide as the client rect */
|
||||
/* The expansion is due to an upwards line wrap so we must partially include
|
||||
it in the update region */
|
||||
nstart_line = line_index;
|
||||
nstart_index = current_line->index;
|
||||
istart = current_line->index + orig_net_length;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Adjust length to include line termination */
|
||||
|
|
Loading…
Reference in New Issue