mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Send up and down keys for mouse wheel in alternate screen mode (when it
normally does nothing), from Marcel Partap.
This commit is contained in:
parent
94ccc6aeaa
commit
353d1825d5
15
input-keys.c
15
input-keys.c
@ -205,6 +205,21 @@ input_mouse(struct window_pane *wp, struct session *s, struct mouse_event *m)
|
|||||||
char buf[40];
|
char buf[40];
|
||||||
size_t len;
|
size_t len;
|
||||||
struct paste_buffer *pb;
|
struct paste_buffer *pb;
|
||||||
|
u_int i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the alternate screen is active and hasn't enabled the mouse, send
|
||||||
|
* up and down key presses for the mouse wheel.
|
||||||
|
*/
|
||||||
|
if (wp->saved_grid != NULL && !(wp->screen->mode & ALL_MOUSE_MODES)) {
|
||||||
|
for (i = 0; i < m->scroll; i++) {
|
||||||
|
if (m->wheel == MOUSE_WHEEL_UP)
|
||||||
|
input_key(wp, KEYC_UP);
|
||||||
|
else
|
||||||
|
input_key(wp, KEYC_DOWN);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (wp->screen->mode & ALL_MOUSE_MODES) {
|
if (wp->screen->mode & ALL_MOUSE_MODES) {
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user