1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

when searching in a node, only search within its box

This commit is contained in:
sgerwk 2018-06-25 10:47:51 +02:00
parent bf6d32fb30
commit 2f58dfce13

View File

@ -153,12 +153,13 @@ get_srch(struct document *document)
foreachback (node, document->nodes) {
int x, y;
int height = document->height;
int height = int_min(node->box.y + node->box.height, document->height);
for (y = node->box.y; y < height; y++) {
int width = document->data[y].length;
int width = int_min(node->box.x + node->box.width,
document->data[y].length);
for (x = 0;
for (x = node->box.x;
x < width && document->data[y].chars[x].data <= ' ';
x++);