Fix scrollbar drag position when window is taller than tty, from Michael

Grant.
This commit is contained in:
nicm
2026-06-04 09:24:03 +00:00
parent 580f9ced08
commit 6beebbe074
3 changed files with 24 additions and 11 deletions

View File

@@ -63,6 +63,7 @@ cmd_copy_mode_exec(struct cmd *self, struct cmdq_item *item)
struct client *c = cmdq_get_client(item);
struct session *s;
struct window_pane *wp = target->wp, *swp;
u_int tty_ox, tty_oy, tty_sx, tty_sy;
int line_numbers;
if (args_has(args, 'q')) {
@@ -100,8 +101,9 @@ cmd_copy_mode_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'd'))
window_copy_pagedown(wp, 0, args_has(args, 'e'));
if (args_has(args, 'S')) {
tty_window_offset(&c->tty, &tty_ox, &tty_oy, &tty_sx, &tty_sy);
window_copy_scroll(wp, c->tty.mouse_slider_mpos, event->m.y,
args_has(args, 'e'));
tty_oy, args_has(args, 'e'));
return (CMD_RETURN_NORMAL);
}