summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2017-04-20 15:16:20 +0000
committernicm <nicm>2017-04-20 15:16:20 +0000
commit51a0dbb172b5a051711213232a7a963524cf7eb5 (patch)
tree0c5296925189928143d31d17d75a28a2e51de235
parent21993105e53da0f5aae583b494c83f1cbbf48b1b (diff)
Only set up a current target for mouse key bindings. Fixes:
bind q select-pane -U \; resize-pane -Z (There is still some possible weirdness with the way we do current targets, it should probably be done in a different way at some point.)
-rw-r--r--server-client.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/server-client.c b/server-client.c
index ca1d1508..41135c00 100644
--- a/server-client.c
+++ b/server-client.c
@@ -940,8 +940,8 @@ retry:
server_status_client(c);
/* Find default state if the pane is known. */
- cmd_find_clear_state(&fs, NULL, 0);
- if (wp != NULL) {
+ if (KEYC_IS_MOUSE(key) && m->valid && wp != NULL) {
+ cmd_find_clear_state(&fs, NULL, 0);
fs.s = s;
fs.wl = fs.s->curw;
fs.w = fs.wl->window;
@@ -950,10 +950,9 @@ retry:
if (!cmd_find_valid_state(&fs))
fatalx("invalid key state");
- }
-
- /* Dispatch the key binding. */
- key_bindings_dispatch(bd, c, m, &fs);
+ key_bindings_dispatch(bd, c, m, &fs);
+ } else
+ key_bindings_dispatch(bd, c, m, NULL);
key_bindings_unref_table(table);
return;
}