mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -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:
parent
f62d2d1ae4
commit
8548108e39
@ -500,7 +500,8 @@ good_char:
|
|||||||
unicode_val_T prev = get_combined(document->combi, document->combi_length + 1);
|
unicode_val_T prev = get_combined(document->combi, document->combi_length + 1);
|
||||||
|
|
||||||
if (prev != UCS_NO_CHAR)
|
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;
|
document->combi_length = 0;
|
||||||
}
|
}
|
||||||
@ -526,8 +527,8 @@ good_char:
|
|||||||
schar->data = (unicode_val_T)data;
|
schar->data = (unicode_val_T)data;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_COMBINE
|
#ifdef CONFIG_COMBINE
|
||||||
document->comb_x = x;
|
document->comb_x = X(x);
|
||||||
document->comb_y = y;
|
document->comb_y = Y(y);
|
||||||
#endif
|
#endif
|
||||||
copy_screen_chars(&POS(x++, y), schar, 1);
|
copy_screen_chars(&POS(x++, y), schar, 1);
|
||||||
} /* while chars < end */
|
} /* while chars < end */
|
||||||
|
Loading…
Reference in New Issue
Block a user