summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/key-string.c5
-rw-r--r--usr.bin/tmux/mode-key.c6
-rw-r--r--usr.bin/tmux/server-client.c24
-rw-r--r--usr.bin/tmux/tmux.112
-rw-r--r--usr.bin/tmux/tmux.h5
5 files changed, 29 insertions, 23 deletions
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c
index d930e4e446a..6124e53ce4f 100644
--- a/usr.bin/tmux/key-string.c
+++ b/usr.bin/tmux/key-string.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key-string.c,v 1.35 2016/03/02 15:36:02 nicm Exp $ */
+/* $OpenBSD: key-string.c,v 1.36 2016/03/18 07:28:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -93,6 +93,9 @@ const struct {
KEYC_MOUSE_STRING(MOUSEDRAG1, MouseDrag1),
KEYC_MOUSE_STRING(MOUSEDRAG2, MouseDrag2),
KEYC_MOUSE_STRING(MOUSEDRAG3, MouseDrag3),
+ KEYC_MOUSE_STRING(MOUSEDRAGEND1, MouseDragEnd1),
+ KEYC_MOUSE_STRING(MOUSEDRAGEND2, MouseDragEnd2),
+ KEYC_MOUSE_STRING(MOUSEDRAGEND3, MouseDragEnd3),
KEYC_MOUSE_STRING(WHEELUP, WheelUp),
KEYC_MOUSE_STRING(WHEELDOWN, WheelDown),
};
diff --git a/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c
index 68b5ba46943..1d55a381e0d 100644
--- a/usr.bin/tmux/mode-key.c
+++ b/usr.bin/tmux/mode-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mode-key.c,v 1.66 2016/03/01 12:04:43 nicm Exp $ */
+/* $OpenBSD: mode-key.c,v 1.67 2016/03/18 07:28:27 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -347,7 +347,7 @@ const struct mode_key_entry mode_key_vi_copy[] = {
{ KEYC_WHEELUP_PANE, 0, MODEKEYCOPY_SCROLLUP },
{ KEYC_WHEELDOWN_PANE, 0, MODEKEYCOPY_SCROLLDOWN },
{ KEYC_MOUSEDRAG1_PANE, 0, MODEKEYCOPY_STARTSELECTION },
- { KEYC_MOUSEUP1_PANE, 0, MODEKEYCOPY_COPYSELECTION },
+ { KEYC_MOUSEDRAGEND1_PANE, 0, MODEKEYCOPY_COPYSELECTION },
{ 0, -1, 0 }
};
@@ -496,7 +496,7 @@ const struct mode_key_entry mode_key_emacs_copy[] = {
{ KEYC_WHEELUP_PANE, 0, MODEKEYCOPY_SCROLLUP },
{ KEYC_WHEELDOWN_PANE, 0, MODEKEYCOPY_SCROLLDOWN },
{ KEYC_MOUSEDRAG1_PANE, 0, MODEKEYCOPY_STARTSELECTION },
- { KEYC_MOUSEUP1_PANE, 0, MODEKEYCOPY_COPYSELECTION },
+ { KEYC_MOUSEDRAGEND1_PANE, 0, MODEKEYCOPY_COPYSELECTION },
{ 0, -1, 0 }
};
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 03a679f8f5b..36d4ec131e8 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.182 2016/03/01 12:04:43 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.183 2016/03/18 07:28:27 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -385,33 +385,33 @@ server_client_check_mouse(struct client *c)
c->tty.mouse_drag_release = NULL;
/*
- * End a mouse drag by passing a MouseUp key corresponding to
- * the button that started the drag.
+ * End a mouse drag by passing a MouseDragEnd key corresponding
+ * to the button that started the drag.
*/
switch (c->tty.mouse_drag_flag) {
case 1:
if (where == PANE)
- key = KEYC_MOUSEUP1_PANE;
+ key = KEYC_MOUSEDRAGEND1_PANE;
if (where == STATUS)
- key = KEYC_MOUSEUP1_STATUS;
+ key = KEYC_MOUSEDRAGEND1_STATUS;
if (where == BORDER)
- key = KEYC_MOUSEUP1_BORDER;
+ key = KEYC_MOUSEDRAGEND1_BORDER;
break;
case 2:
if (where == PANE)
- key = KEYC_MOUSEUP2_PANE;
+ key = KEYC_MOUSEDRAGEND2_PANE;
if (where == STATUS)
- key = KEYC_MOUSEUP2_STATUS;
+ key = KEYC_MOUSEDRAGEND2_STATUS;
if (where == BORDER)
- key = KEYC_MOUSEUP2_BORDER;
+ key = KEYC_MOUSEDRAGEND2_BORDER;
break;
case 3:
if (where == PANE)
- key = KEYC_MOUSEUP3_PANE;
+ key = KEYC_MOUSEDRAGEND3_PANE;
if (where == STATUS)
- key = KEYC_MOUSEUP3_STATUS;
+ key = KEYC_MOUSEDRAGEND3_STATUS;
if (where == BORDER)
- key = KEYC_MOUSEUP3_BORDER;
+ key = KEYC_MOUSEDRAGEND3_BORDER;
break;
default:
key = KEYC_MOUSE;
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index ed3fac52f3b..b0595a7821f 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.480 2016/03/01 11:58:45 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.481 2016/03/18 07:28:27 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
@@ -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: March 1 2016 $
+.Dd $Mdocdate: March 18 2016 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -3294,10 +3294,10 @@ for a pane border or
for the status line).
The following mouse events are available:
.Bl -column "MouseDown1" "MouseDrag1" "WheelDown" -offset indent
-.It Li "MouseDown1" Ta "MouseUp1" Ta "MouseDrag1"
-.It Li "MouseDown2" Ta "MouseUp2" Ta "MouseDrag2"
-.It Li "MouseDown3" Ta "MouseUp3" Ta "MouseDrag3"
-.It Li "WheelUp" Ta "WheelDown" Ta ""
+.It Li "MouseDown1" Ta "MouseUp1" Ta "MouseDrag1" Ta "MouseDragEnd1"
+.It Li "MouseDown2" Ta "MouseUp2" Ta "MouseDrag2" Ta "MouseDragEnd2"
+.It Li "MouseDown3" Ta "MouseUp3" Ta "MouseDrag3" Ta "MouseDragEnd3"
+.It Li "WheelUp" Ta "WheelDown" Ta "" Ta ""
.El
.Pp
Each should be suffixed with a location, for example
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index b0cf163db40..846e5eb4c8e 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.622 2016/03/02 15:36:02 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.623 2016/03/18 07:28:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -135,6 +135,9 @@ enum {
KEYC_MOUSE_KEY(MOUSEDRAG1),
KEYC_MOUSE_KEY(MOUSEDRAG2),
KEYC_MOUSE_KEY(MOUSEDRAG3),
+ KEYC_MOUSE_KEY(MOUSEDRAGEND1),
+ KEYC_MOUSE_KEY(MOUSEDRAGEND2),
+ KEYC_MOUSE_KEY(MOUSEDRAGEND3),
KEYC_MOUSE_KEY(WHEELUP),
KEYC_MOUSE_KEY(WHEELDOWN),