From b9a00cbe8ac7436008b9697de4b738ebed19ed8c Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 14 Apr 2020 19:07:10 +0000 Subject: [PATCH] Leave the cursor above empty lines. --- window-copy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/window-copy.c b/window-copy.c index 90c4b45f..f6f29f9a 100644 --- a/window-copy.c +++ b/window-copy.c @@ -130,8 +130,6 @@ static void window_copy_rectangle_toggle(struct window_mode_entry *); static void window_copy_move_mouse(struct mouse_event *); static void window_copy_drag_update(struct client *, struct mouse_event *); static void window_copy_drag_release(struct client *, struct mouse_event *); -static struct screen *window_copy_clone_screen(struct screen *, - struct screen *); const struct window_mode window_copy_mode = { .name = "copy-mode", @@ -322,7 +320,7 @@ window_copy_clone_screen(struct screen *src, struct screen *hint) } screen_write_start(&ctx, NULL, dst); - screen_write_cursormove(&ctx, 0, dst->grid->sy - 1, 0); + screen_write_cursormove(&ctx, 0, dst->grid->sy + sy - dy - 1, 0); screen_write_stop(&ctx); return (dst);