and remove condition to enable mouse in choose mode.
This time, no backwards compatible mercy. RTFM!
---
input-keys.c | 2 +-
options-table.c | 8 ++++----
server-client.c | 2 +-
tmux.1 | 11 +++++------
window-choose.c | 3 +--
window-copy.c | 2 +-
window.c | 2 +-
7 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/input-keys.c b/input-keys.c
index 2b30d4b..2b8533d 100644
--- a/input-keys.c
+++ b/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/options-table.c b/options-table.c
index 8ce838a..e3e4362 100644
--- a/options-table.c
+++ b/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/server-client.c b/server-client.c
index c38d6d6..74de3ff 100644
--- a/server-client.c
+++ b/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/tmux.1 b/tmux.1
index 7d32dbe..28baf6c 100644
--- a/tmux.1
+++ b/tmux.1
@@ -2697,15 +2697,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/window-choose.c b/window-choose.c
index c77a1d3..968ddb4 100644
--- a/window-choose.c
+++ b/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/window-copy.c b/window-copy.c
index 6d18dd4..ca4c97b 100644
--- a/window-copy.c
+++ b/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/window.c b/window.c
index 5ef8195..1acc153 100644
--- a/window.c
+++ b/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
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users