Commit 8f50bf5e authored by Benoît Knecht's avatar Benoît Knecht Committed by Sebastian Ramacher
Browse files

Fix fence post error in page-widget's redraw_rect()

A rectangle whose horizontal coordinates are x1 on the left and x2 on
the right is (x2 + 1) - x1 pixels wide, not x2 - x1.

This error caused the search result highlighting to leave a
one-pixel-wide border behind, on the right and bottom side of the

See issue 242 <

Reported-by: default avatarAbdó Roig <>
Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <>
parent 006724bc
......@@ -506,8 +506,8 @@ redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle)
GdkRectangle grect;
grect.x = rectangle->x1;
grect.y = rectangle->y1;
grect.width = rectangle->x2 - rectangle->x1;
grect.height = rectangle->y2 - rectangle->y1;
grect.width = (rectangle->x2 + 1) - rectangle->x1;
grect.height = (rectangle->y2 + 1) - rectangle->y1;
gtk_widget_queue_draw_area(GTK_WIDGET(widget), grect.x, grect.y, grect.width, grect.height);
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