mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-23 22:00:59 +01:00
Only set a mouse mode for mouse-select-pane if none already set by the
mode (any will do).
This commit is contained in:
parent
8f8e81c0c9
commit
3de1700f61
@ -449,9 +449,14 @@ server_client_reset_state(struct client *c)
|
|||||||
else
|
else
|
||||||
tty_cursor(&c->tty, wp->xoff + s->cx, wp->yoff + s->cy);
|
tty_cursor(&c->tty, wp->xoff + s->cx, wp->yoff + s->cy);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Any mode will do for mouse-select-pane, but set standard mode if
|
||||||
|
* none.
|
||||||
|
*/
|
||||||
mode = s->mode;
|
mode = s->mode;
|
||||||
if (TAILQ_NEXT(TAILQ_FIRST(&w->panes), entry) != NULL &&
|
if (TAILQ_NEXT(TAILQ_FIRST(&w->panes), entry) != NULL &&
|
||||||
options_get_number(oo, "mouse-select-pane"))
|
options_get_number(oo, "mouse-select-pane") &&
|
||||||
|
(mode & ALL_MOUSE_MODES) == 0)
|
||||||
mode |= MODE_MOUSE_STANDARD;
|
mode |= MODE_MOUSE_STANDARD;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
16
tty.c
16
tty.c
@ -401,19 +401,19 @@ tty_update_mode(struct tty *tty, int mode)
|
|||||||
if (mode & ALL_MOUSE_MODES) {
|
if (mode & ALL_MOUSE_MODES) {
|
||||||
if (mode & MODE_MOUSE_UTF8)
|
if (mode & MODE_MOUSE_UTF8)
|
||||||
tty_puts(tty, "\033[?1005h");
|
tty_puts(tty, "\033[?1005h");
|
||||||
if (mode & MODE_MOUSE_STANDARD)
|
if (mode & MODE_MOUSE_ANY)
|
||||||
tty_puts(tty, "\033[?1000h");
|
tty_puts(tty, "\033[?1003h");
|
||||||
else if (mode & MODE_MOUSE_BUTTON)
|
else if (mode & MODE_MOUSE_BUTTON)
|
||||||
tty_puts(tty, "\033[?1002h");
|
tty_puts(tty, "\033[?1002h");
|
||||||
else if (mode & MODE_MOUSE_ANY)
|
else if (mode & MODE_MOUSE_STANDARD)
|
||||||
tty_puts(tty, "\033[?1003h");
|
tty_puts(tty, "\033[?1000h");
|
||||||
} else {
|
} else {
|
||||||
if (tty->mode & MODE_MOUSE_STANDARD)
|
if (tty->mode & MODE_MOUSE_ANY)
|
||||||
tty_puts(tty, "\033[?1000l");
|
tty_puts(tty, "\033[?1003l");
|
||||||
else if (tty->mode & MODE_MOUSE_BUTTON)
|
else if (tty->mode & MODE_MOUSE_BUTTON)
|
||||||
tty_puts(tty, "\033[?1002l");
|
tty_puts(tty, "\033[?1002l");
|
||||||
else if (tty->mode & MODE_MOUSE_ANY)
|
else if (tty->mode & MODE_MOUSE_STANDARD)
|
||||||
tty_puts(tty, "\033[?1003l");
|
tty_puts(tty, "\033[?1000l");
|
||||||
if (tty->mode & MODE_MOUSE_UTF8)
|
if (tty->mode & MODE_MOUSE_UTF8)
|
||||||
tty_puts(tty, "\033[?1005l");
|
tty_puts(tty, "\033[?1005l");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user