1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Make document.comb_{x,y} not relative to part.box.

Previously, the character at (document.comb_x, document.comb_y) was
accessed via the POS macro, which adds part.box.x and part.box.y to
the coordinates.  However, if document.comb and document.y are set
at the end of one part and read at the beginning of another, then
the struct screen_char used by the original part should be updated,
even though the new part has a different box.  Change comb_{x,y} to
be relative to the document, rather than to the box of a single part.
This commit is contained in:
Kalle Olavi Niemitalo 2008-09-14 11:10:47 +03:00 committed by Kalle Olavi Niemitalo
parent f62d2d1ae4
commit 8548108e39

View File

@ -500,7 +500,8 @@ good_char:
unicode_val_T prev = get_combined(document->combi, document->combi_length + 1);
if (prev != UCS_NO_CHAR)
POS(document->comb_x, document->comb_y).data = prev;
document->data[document->comb_y]
.chars[document->comb_x].data = prev;
}
document->combi_length = 0;
}
@ -526,8 +527,8 @@ good_char:
schar->data = (unicode_val_T)data;
}
#ifdef CONFIG_COMBINE
document->comb_x = x;
document->comb_y = y;
document->comb_x = X(x);
document->comb_y = Y(y);
#endif
copy_screen_chars(&POS(x++, y), schar, 1);
} /* while chars < end */