Revision: 2574
http://tmux.svn.sourceforge.net/tmux/?rev=2574&view=rev
Author: tcunha
Date: 2011-08-04 17:05:35 +0000 (Thu, 04 Aug 2011)
Log Message:
-----------
Sync OpenBSD patchset 941:
Extend the mode-mouse option to add a third choice which means the mouse
does not enter copy mode. Patch from SF bug 3374493.
In future the mode-mouse option is likely to die and be broken into
several smaller options.
Modified Paths:
--------------
trunk/input-keys.c
trunk/options-table.c
trunk/tmux.1
Modified: trunk/input-keys.c
===================================================================
--- trunk/input-keys.c 2011-08-04 17:04:08 UTC (rev 2573)
+++ trunk/input-keys.c 2011-08-04 17:05:35 UTC (rev 2574)
@@ -203,6 +203,7 @@
{
char buf[10];
size_t len;
+ int value;
if (wp->screen->mode & ALL_MOUSE_MODES) {
if (wp->screen->mode & MODE_MOUSE_UTF8) {
@@ -220,7 +221,8 @@
}
bufferevent_write(wp->event, buf, len);
} else if ((m->b & MOUSE_BUTTON) != MOUSE_2) {
- if (options_get_number(&wp->window->options, "mode-mouse") &&
+ value = options_get_number(&wp->window->options, "mode-mouse");
+ if (value == 1 &&
window_pane_set_mode(wp, &window_copy_mode) == 0) {
window_copy_init_from_pane(wp);
if (wp->mode->mouse != NULL)
Modified: trunk/options-table.c
===================================================================
--- trunk/options-table.c 2011-08-04 17:04:08 UTC (rev 2573)
+++ trunk/options-table.c 2011-08-04 17:05:35 UTC (rev 2574)
@@ -35,6 +35,9 @@
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_clock_mode_style_list[] = {
"12", "24", NULL
};
@@ -483,7 +486,8 @@
},
{ .name = "mode-mouse",
- .type = OPTIONS_TABLE_FLAG,
+ .type = OPTIONS_TABLE_CHOICE,
+ .choices = options_table_mode_mouse_list,
.default_num = 0
},
Modified: trunk/tmux.1
===================================================================
--- trunk/tmux.1 2011-08-04 17:04:08 UTC (rev 2573)
+++ trunk/tmux.1 2011-08-04 17:05:35 UTC (rev 2574)
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 25 2011 $
+.Dd $Mdocdate: July 30 2011 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -2362,12 +2362,17 @@
.Ql vi .
.Pp
.It Xo Ic mode-mouse
-.Op Ic on | off
+.Op Ic on | off | copy-mode
.Xc
Mouse state in modes.
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.
+If set to
+.Em
+copy-mode ,
+the mouse behaves as set to on, but cannot be used to enter copy
+mode.
.Pp
.It Xo Ic monitor-activity
.Op Ic on | off
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs