--- trunk/input-keys.c | 2 +- trunk/options-table.c | 8 ++++---- trunk/server-client.c | 2 +- trunk/tmux.1 | 11 +++++------ trunk/window-choose.c | 3 +-- trunk/window-copy.c | 2 +- trunk/window.c | 2 +- 7 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/trunk/input-keys.c b/trunk/input-keys.c index 2b30d4b..2b8533d 100644 --- a/trunk/input-keys.c +++ b/trunk/input-keys.c @@ -223,7 +223,7 @@ input_mouse(struct window_pane *wp, struct mouse_event *m) } if ((m->b & 3) != 1 && - options_get_number(&wp->window->options, "mode-mouse") == 1) { + options_get_number(&wp->window->options, "mouse-copy-mode") == 1) { if (window_pane_set_mode(wp, &window_copy_mode) == 0) { window_copy_init_from_pane(wp); if (wp->mode->mouse != NULL) diff --git a/trunk/options-table.c b/trunk/options-table.c index 8ce838a..e3e4362 100644 --- a/trunk/options-table.c +++ b/trunk/options-table.c @@ -35,8 +35,8 @@ const char *options_table_mode_keys_list[] = { "emacs", "vi", NULL }; -const char *options_table_mode_mouse_list[] = { - "off", "on", "copy-mode", NULL +const char *options_table_mouse_copy_mode_list[] = { + "off", "on", "within", NULL }; const char *options_table_clock_mode_style_list[] = { "12", "24", NULL @@ -551,9 +551,9 @@ const struct options_table_entry window_options_table[] = { .default_num = MODEKEY_EMACS }, - { .name = "mode-mouse", + { .name = "mouse-copy-mode", .type = OPTIONS_TABLE_CHOICE, - .choices = options_table_mode_mouse_list, + .choices = options_table_mouse_copy_mode_list, .default_num = 0 }, diff --git a/trunk/server-client.c b/trunk/server-client.c index 1f407e4..f756185 100644 --- a/trunk/server-client.c +++ b/trunk/server-client.c @@ -539,7 +539,7 @@ server_client_reset_state(struct client *c) mode |= MODE_MOUSE_STANDARD; else if (options_get_number(oo, "mouse-select-window")) mode |= MODE_MOUSE_STANDARD; - else if (options_get_number(wo, "mode-mouse")) + else if (options_get_number(wo, "mouse-copy-mode")) mode |= MODE_MOUSE_STANDARD; } diff --git a/trunk/tmux.1 b/trunk/tmux.1 index 1a683b5..9316df8 100644 --- a/trunk/tmux.1 +++ b/trunk/tmux.1 @@ -2670,15 +2670,14 @@ or contains .Ql vi . .Pp -.It Xo Ic mode-mouse -.Op Ic on | off | copy-mode +.It Xo Ic mouse-copy-mode +.Op Ic on | off | within .Xc -Mouse state in modes. +Mouse / copy mode interaction. If on, the mouse may be used to enter copy mode and copy a selection by -dragging, to enter copy mode and scroll with the mouse wheel, or to select an -option in choice mode. +dragging, to enter copy mode and scroll with the mouse wheel. If set to -.Em copy-mode , +.Em within , the mouse behaves as set to on, but cannot be used to enter copy mode. .Pp diff --git a/trunk/window-choose.c b/trunk/window-choose.c index 9ab277d..56ee6c3 100644 --- a/trunk/window-choose.c +++ b/trunk/window-choose.c @@ -132,8 +132,7 @@ window_choose_init(struct window_pane *wp) s = &data->screen; screen_init(s, screen_size_x(&wp->base), screen_size_y(&wp->base), 0); s->mode &= ~MODE_CURSOR; - if (options_get_number(&wp->window->options, "mode-mouse")) - s->mode |= MODE_MOUSE_STANDARD; + s->mode |= MODE_MOUSE_STANDARD; keys = options_get_number(&wp->window->options, "mode-keys"); if (keys == MODEKEY_EMACS) diff --git a/trunk/window-copy.c b/trunk/window-copy.c index 6d18dd4..ca4c97b 100644 --- a/trunk/window-copy.c +++ b/trunk/window-copy.c @@ -182,7 +182,7 @@ window_copy_init(struct window_pane *wp) s = &data->screen; screen_init(s, screen_size_x(&wp->base), screen_size_y(&wp->base), 0); - if (options_get_number(&wp->window->options, "mode-mouse")) + if (options_get_number(&wp->window->options, "mouse-copy-mode")) s->mode |= MODE_MOUSE_STANDARD; keys = options_get_number(&wp->window->options, "mode-keys"); diff --git a/trunk/window.c b/trunk/window.c index 5ef8195..1acc153 100644 --- a/trunk/window.c +++ b/trunk/window.c @@ -1018,7 +1018,7 @@ window_pane_mouse( if (wp->mode != NULL) { if (wp->mode->mouse != NULL && - options_get_number(&wp->window->options, "mode-mouse")) + options_get_number(&wp->window->options, "mouse-copy-mode")) wp->mode->mouse(wp, sess, m); } else if (wp->fd != -1) input_mouse(wp, m); -- 1.7.10.4 ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users