- renaming mode-mouse to mouse-copy-mode (multiple incidents of
confusion because of the too-general name)
Not enough. Just renaming it is not ok. mode-mouse does this:
- Click to paste outside copy mode.
- Copy text on drag outside copy mode.
- Copy text on drag inside copy mode.
- Scroll up and down in copy mode.
- Select item in choose mode.
Yes, after breaking my head on it I realized that. The patch posted back
9 months ago removes the last of these toggles - there is no obvious
reason to disable mouse item selecting in choose mode, imho, EVER. Is there?
So all that remains is about how the mouse engages regarding copy mode.
We could split it up into a few options but what?
Perhaps just two: mouse-copy-paste (copy/paste inside and outside copy
mode) and mouse-in-modes (scroll wheel in copy mode, select in choose
mode, scroll wheel in choose mode too maybe).
The latter option does not make sense. Why would one want to have mouse
input, but not enable wheel scrolling?
In any case this will wait for 1.9.
Why? why release another release with a confusing name? What is the
external force demanding an 1.8 release TODAY?
- pane-active-border-mark option to indicate current pane (as an option
to the horrible half-line indicator that was committed 12 days ago)
Don't bother with ^v<>, even as an option. I tried it - with UTF-8
arrows and without - and I don't like it. Get some new suggestions we
both like.
Oh YOU don't like it. And regardless who might or might not like it,
YOUR new preference becomes the default behaviour for 1.8. That's a
reasonable approach, after all free software is neither about choice nor
customization. Excuse me?
- mouse wheel scrolling emulation (yes, it is ready since long)
- fix of unwanted side effects of new osdep_get_cwd() behaviour
These maybe but the first is definitely for 1.9.
It has been ready since a year, I have been using it since a year, I
have been debugging it since a year, AND *the code is simple*. So let's
rush out a 1.8 release so that for another couple of months, noone gets
to scroll in his less pager. Because mouse scrolling is for wimps only
anyways. Huh?
#Regards.
>From 0a05c60331c99b87cef31ea4117f8a0144cb0422 Mon Sep 17 00:00:00 2001
From: Marcel Partap <mpar...@gmx.net>
Date: Sun, 24 Jun 2012 23:17:06 +0200
Subject: [PATCH 3/7] Rename mode-mouse option to mouse-copy-mode
and remove condition to enable mouse in choose mode.
---
trunk/input-keys.c | 2 +-
trunk/options-table.c | 9 +++++----
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, 15 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 bc557dd..743d2a8 100644
--- a/trunk/options-table.c
+++ b/trunk/options-table.c
@@ -38,8 +38,8 @@ int renamed_entry_cmp(const void *, const void *);
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
@@ -554,9 +554,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
},
@@ -725,6 +725,7 @@ struct renamed_entry {
/* Translation table for deprecated option strings */
const struct renamed_entry renamed_options_table[] = {
+ { "mode-mouse", "mouse-copy-mode", 1, &((const struct renamed_entry[]){ { "copy-mode", "within", 0, 0 } }) }
};
int
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
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users