From 4bdf5fbbc488084485e455d1b68879a48a98d5ff Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 3 Aug 2020 18:56:26 +0200 Subject: [PATCH] [clipboard] Fixes --- src/viewer/text/draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viewer/text/draw.c b/src/viewer/text/draw.c index 8e9b4fef9..9ae45f345 100644 --- a/src/viewer/text/draw.c +++ b/src/viewer/text/draw.c @@ -185,8 +185,8 @@ draw_clipboard(struct terminal *term, struct document_view *doc_view) starty = int_max(doc_view->box.y, document->clipboard_box.y + yoffset); endy = int_min(doc_view->box.y + doc_view->box.height, document->clipboard_box.y + document->clipboard_box.height + yoffset); - startx = int_max(0, document->clipboard_box.x + xoffset); - endx = int_min(doc_view->box.width, document->clipboard_box.x + document->clipboard_box.width + xoffset); + startx = int_max(doc_view->box.x, document->clipboard_box.x + xoffset); + endx = int_min(doc_view->box.x + doc_view->box.width, document->clipboard_box.x + document->clipboard_box.width + xoffset); if (endy < starty) { int tmp = endy;