Commit 242329b5 authored by Reto Schnyder's avatar Reto Schnyder Committed by Sebastian Ramacher
Browse files

Fix links that target a location within a page

Before, clicking on a link would always jump to the beginning of the
linked-to page, even when the link targets a specific point within the
page.
parent 0ea99dff
Pipeline #391 passed with stages
in 2 minutes and 2 seconds
......@@ -172,14 +172,14 @@ link_goto_dest(zathura_t* zathura, const zathura_link_t* link)
/* shift the position or set to auto */
if (link->target.destination_type == ZATHURA_LINK_DESTINATION_XYZ &&
link->target.left != -1 && link_hadjust == true) {
pos_x += shiftx / doc_width;
pos_x += shiftx * cell_width / doc_width;
} else {
pos_x = -1; /* -1 means automatic */
}
if (link->target.destination_type == ZATHURA_LINK_DESTINATION_XYZ &&
link->target.top != -1) {
pos_y += shifty / doc_height;
pos_y += shifty * cell_height / doc_height;
} else {
pos_y = -1; /* -1 means automatic */
}
......
Supports Markdown
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