Commit ad4f5f5f authored by Abdo Roig-Maranges's avatar Abdo Roig-Maranges Committed by Sebastian Ramacher

fix rectangles subindex. Need page not 0

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 5a992d2d
......@@ -168,7 +168,7 @@ highlight_rects(zathura_t* zathura, unsigned int page,
document_draw_search_results(zathura, true);
if (rectangles[0] == NULL || girara_list_size(rectangles[0]) == 0) {
if (rectangles[page] == NULL || girara_list_size(rectangles[page]) == 0) {
page_set(zathura, page);
return;
}
......@@ -188,7 +188,7 @@ highlight_rects(zathura_t* zathura, unsigned int page,
unsigned int doc_width = 0;
zathura_document_get_document_size(zathura->document, &doc_height, &doc_width);
zathura_rectangle_t* rectangle = girara_list_nth(rectangles[0], 0);
zathura_rectangle_t* rectangle = girara_list_nth(rectangles[page], 0);
pos_y += (rectangle->y1 - (double)cell_height/2) / (double)doc_height;
pos_x += (rectangle->x1 - (double)cell_width/2) / (double)doc_width;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment