From 00c34df1868ffde8ece952729ddf2e4df09667be Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 11 Nov 2015 23:23:33 +0000 Subject: [PATCH] Drop mouse-utf8 option and always turn on UTF-8 mouse if the client says it supports UTF-8. --- options-table.c | 5 ----- server-client.c | 12 +++++------- tmux.1 | 4 ---- tmux.c | 1 - 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/options-table.c b/options-table.c index cfec138d..4e9a0a81 100644 --- a/options-table.c +++ b/options-table.c @@ -256,11 +256,6 @@ const struct options_table_entry session_options_table[] = { .default_num = 0 }, - { .name = "mouse-utf8", - .type = OPTIONS_TABLE_FLAG, - .default_num = 0 - }, - { .name = "prefix", .type = OPTIONS_TABLE_KEY, .default_num = '\002', diff --git a/server-client.c b/server-client.c index f1e2deff..521f2737 100644 --- a/server-client.c +++ b/server-client.c @@ -801,14 +801,12 @@ server_client_reset_state(struct client *c) mode = (mode & ~ALL_MOUSE_MODES) | MODE_MOUSE_BUTTON; /* - * Set UTF-8 mouse input if required. If the terminal is UTF-8, the - * user has set mouse-utf8 and any mouse mode is in effect, turn on - * UTF-8 mouse input. If the receiving terminal hasn't requested it - * (that is, it isn't in s->mode), then it'll be converted in - * input_mouse. + * Set UTF-8 mouse input if required. If the terminal is UTF-8 and any + * mouse mode is in effect, turn on UTF-8 mouse input. If the receiving + * terminal hasn't requested it (that is, it isn't in s->mode), then + * it'll be converted in input_mouse. */ - if ((c->tty.flags & TTY_UTF8) && - (mode & ALL_MOUSE_MODES) && options_get_number(oo, "mouse-utf8")) + if ((c->tty.flags & TTY_UTF8) && (mode & ALL_MOUSE_MODES)) mode |= MODE_MOUSE_UTF8; else mode &= ~MODE_MOUSE_UTF8; diff --git a/tmux.1 b/tmux.1 index 1fb99252..4420ac3a 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2655,10 +2655,6 @@ captures the mouse and allows mouse events to be bound as key bindings. See the .Sx MOUSE SUPPORT section for details. -.It Xo Ic mouse-utf8 -.Op Ic on | off -.Xc -If enabled, request mouse input as UTF-8 on UTF-8 terminals. .It Ic prefix Ar key Set the key accepted as a prefix key. .It Ic prefix2 Ar key diff --git a/tmux.c b/tmux.c index 758479b8..1e68d9bb 100644 --- a/tmux.c +++ b/tmux.c @@ -294,7 +294,6 @@ main(int argc, char **argv) /* Enable UTF-8 if the first client is on UTF-8 terminal. */ if (flags & CLIENT_UTF8) { options_set_number(global_s_options, "status-utf8", 1); - options_set_number(global_s_options, "mouse-utf8", 1); options_set_number(global_w_options, "utf8", 1); }