summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libview/ev-view.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index f0b5d69e..64674fdf 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -7391,10 +7391,13 @@ compute_new_selection_text (EvView *view,
else
point = stop;
- if (i == first)
+ if (i == first) {
_ev_view_transform_view_point_to_doc_point (view, point, &page_area,
&selection->rect.x1,
&selection->rect.y1);
+ selection->rect.x1 = MAX (selection->rect.x1 - border.left, 0);
+ selection->rect.y1 = MAX (selection->rect.y1 - border.top, 0);
+ }
/* If the selection is contained within just one page,
* make sure we don't write 'start' into both points
@@ -7402,10 +7405,13 @@ compute_new_selection_text (EvView *view,
if (first == last)
point = stop;
- if (i == last)
+ if (i == last) {
_ev_view_transform_view_point_to_doc_point (view, point, &page_area,
&selection->rect.x2,
&selection->rect.y2);
+ selection->rect.x2 = MAX (selection->rect.x2 - border.right, 0);
+ selection->rect.y2 = MAX (selection->rect.y2 - border.bottom, 0);
+ }
list = g_list_append (list, selection);
}