1
0
mirror of https://github.com/tmux/tmux.git synced 2025-03-22 21:08:49 +00:00

Remove support for the continuous reporting "any" mouse mode which never

really worked properly and is rarely used.
This commit is contained in:
nicm 2014-08-09 07:33:37 +00:00
parent b8b00aad5d
commit 1ac96200a7
5 changed files with 5 additions and 16 deletions

View File

@ -601,8 +601,6 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
!!(wp->base.mode & MODE_MOUSE_STANDARD));
format_add(ft, "mouse_button_flag", "%d",
!!(wp->base.mode & MODE_MOUSE_BUTTON));
format_add(ft, "mouse_any_flag", "%d",
!!(wp->base.mode & MODE_MOUSE_ANY));
format_add(ft, "mouse_utf8_flag", "%d",
!!(wp->base.mode & MODE_MOUSE_UTF8));

View File

@ -1374,7 +1374,6 @@ input_csi_dispatch_rm_private(struct input_ctx *ictx)
case 1000:
case 1001:
case 1002:
case 1003:
screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES);
break;
case 1004:
@ -1451,10 +1450,6 @@ input_csi_dispatch_sm_private(struct input_ctx *ictx)
screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES);
screen_write_mode_set(&ictx->ctx, MODE_MOUSE_BUTTON);
break;
case 1003:
screen_write_mode_clear(&ictx->ctx, ALL_MOUSE_MODES);
screen_write_mode_set(&ictx->ctx, MODE_MOUSE_ANY);
break;
case 1004:
if (ictx->ctx.s->mode & MODE_FOCUSON)
break;

View File

@ -647,7 +647,7 @@ server_client_reset_state(struct client *c)
*/
mode = s->mode;
if ((c->tty.mouse.flags & MOUSE_RESIZE_PANE) &&
!(mode & (MODE_MOUSE_BUTTON|MODE_MOUSE_ANY)))
!(mode & MODE_MOUSE_BUTTON))
mode |= MODE_MOUSE_BUTTON;
/*

4
tmux.h
View File

@ -682,13 +682,13 @@ struct mode_key_table {
#define MODE_WRAP 0x10 /* whether lines wrap */
#define MODE_MOUSE_STANDARD 0x20
#define MODE_MOUSE_BUTTON 0x40
#define MODE_MOUSE_ANY 0x80
/* 0x80 unused */
#define MODE_MOUSE_UTF8 0x100
#define MODE_MOUSE_SGR 0x200
#define MODE_BRACKETPASTE 0x400
#define MODE_FOCUSON 0x800
#define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON|MODE_MOUSE_ANY)
#define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON)
/* A single UTF-8 character. */
struct utf8_data {

8
tty.c
View File

@ -513,16 +513,12 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
tty_puts(tty, "\033[?1005l");
tty_puts(tty, "\033[?1006h");
if (mode & MODE_MOUSE_ANY)
tty_puts(tty, "\033[?1003h");
else if (mode & MODE_MOUSE_BUTTON)
if (mode & MODE_MOUSE_BUTTON)
tty_puts(tty, "\033[?1002h");
else if (mode & MODE_MOUSE_STANDARD)
tty_puts(tty, "\033[?1000h");
} else {
if (tty->mode & MODE_MOUSE_ANY)
tty_puts(tty, "\033[?1003l");
else if (tty->mode & MODE_MOUSE_BUTTON)
if (tty->mode & MODE_MOUSE_BUTTON)
tty_puts(tty, "\033[?1002l");
else if (tty->mode & MODE_MOUSE_STANDARD)
tty_puts(tty, "\033[?1000l");