1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

Merge pull request #23 from sgerwk/master

when searching in a node, only search within its box
This commit is contained in:
rkd77 2018-06-25 13:45:05 +02:00 committed by GitHub
commit b4766aa0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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++);