mirror of
https://github.com/tmux/tmux.git
synced 2026-08-03 14:08:59 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Store status position in new mouse event for menus so the position is correct later.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: server-client.c,v 1.499 2026/07/22 08:19:14 nicm Exp $ */
|
||||
/* $OpenBSD: server-client.c,v 1.500 2026/07/28 13:17:45 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -1682,6 +1682,9 @@ server_client_handle_menu_key(struct client *c, struct key_event *event)
|
||||
memcpy(&new_event, event, sizeof new_event);
|
||||
if (KEYC_IS_MOUSE(event->key)) {
|
||||
m = &new_event.m;
|
||||
m->statusat = status_at_line(c);
|
||||
m->statuslines = status_line_size(c);
|
||||
|
||||
tty_window_offset(&c->tty, &ox, &oy, &sx, &sy);
|
||||
m->x += ox;
|
||||
if (m->statusat == 0) {
|
||||
@@ -1689,8 +1692,7 @@ server_client_handle_menu_key(struct client *c, struct key_event *event)
|
||||
m->x = m->y = UINT_MAX;
|
||||
else
|
||||
m->y = m->y - m->statuslines + oy;
|
||||
} else if (m->statusat > 0 &&
|
||||
m->y >= (u_int)m->statusat)
|
||||
} else if (m->statusat > 0 && m->y >= (u_int)m->statusat)
|
||||
m->x = m->y = UINT_MAX;
|
||||
else
|
||||
m->y += oy;
|
||||
|
||||
Reference in New Issue
Block a user