aboutsummaryrefslogtreecommitdiff
path: root/input-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2012-11-22 16:48:50 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2012-11-22 16:48:50 +0000
commit63f451965cf26bf6baadc374bd0dcadc8ca66308 (patch)
treeac3b5f838273eed3271e04b4132fb22807705c42 /input-keys.c
parent60808bbdede5c489a1faa6671999a92a67b28024 (diff)
parentc04aa9020782fe0a944db2adf5a03e9f52618bea (diff)
downloadrtmux-63f451965cf26bf6baadc374bd0dcadc8ca66308.tar.gz
rtmux-63f451965cf26bf6baadc374bd0dcadc8ca66308.tar.bz2
rtmux-63f451965cf26bf6baadc374bd0dcadc8ca66308.zip
Merge branch 'master' of ssh://tmux.git.sourceforge.net/gitroot/tmux/tmux
Diffstat (limited to 'input-keys.c')
-rw-r--r--input-keys.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/input-keys.c b/input-keys.c
index 2b30d4ba..483d410f 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -199,7 +199,7 @@ input_key(struct window_pane *wp, int key)
/* Translate mouse and output. */
void
-input_mouse(struct window_pane *wp, struct mouse_event *m)
+input_mouse(struct window_pane *wp, struct session *s, struct mouse_event *m)
{
char buf[10];
size_t len;
@@ -207,14 +207,14 @@ input_mouse(struct window_pane *wp, struct mouse_event *m)
if (wp->screen->mode & ALL_MOUSE_MODES) {
if (wp->screen->mode & MODE_MOUSE_UTF8) {
len = xsnprintf(buf, sizeof buf, "\033[M");
- len += utf8_split2(m->b + 32, &buf[len]);
+ len += utf8_split2(m->xb + 32, &buf[len]);
len += utf8_split2(m->x + 33, &buf[len]);
len += utf8_split2(m->y + 33, &buf[len]);
} else {
- if (m->b > 223 || m->x >= 222 || m->y > 222)
+ if (m->xb > 223 || m->x >= 222 || m->y > 222)
return;
len = xsnprintf(buf, sizeof buf, "\033[M");
- buf[len++] = m->b + 32;
+ buf[len++] = m->xb + 32;
buf[len++] = m->x + 33;
buf[len++] = m->y + 33;
}
@@ -222,12 +222,12 @@ input_mouse(struct window_pane *wp, struct mouse_event *m)
return;
}
- if ((m->b & 3) != 1 &&
+ if ((m->xb & 3) != 1 &&
options_get_number(&wp->window->options, "mode-mouse") == 1) {
if (window_pane_set_mode(wp, &window_copy_mode) == 0) {
window_copy_init_from_pane(wp);
if (wp->mode->mouse != NULL)
- wp->mode->mouse(wp, NULL, m);
+ wp->mode->mouse(wp, s, m);
}
return;
}