Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2017-06-06 18:01:13 +01:00
commit 7077980055
3 changed files with 7 additions and 4 deletions

View File

@ -814,7 +814,7 @@ server_client_handle_key(struct client *c, key_code key)
struct timeval tv; struct timeval tv;
struct key_table *table, *first; struct key_table *table, *first;
struct key_binding bd_find, *bd; struct key_binding bd_find, *bd;
int xtimeout; int xtimeout, flags;
struct cmd_find_state fs; struct cmd_find_state fs;
/* Check the client is good to accept input. */ /* Check the client is good to accept input. */
@ -911,6 +911,7 @@ server_client_handle_key(struct client *c, key_code key)
server_status_client(c); server_status_client(c);
return; return;
} }
flags = c->flags;
retry: retry:
/* Log key table. */ /* Log key table. */
@ -988,7 +989,7 @@ retry:
* No match in the root table either. If this wasn't the first table * No match in the root table either. If this wasn't the first table
* tried, don't pass the key to the pane. * tried, don't pass the key to the pane.
*/ */
if (first != table) { if (first != table && (~flags & CLIENT_REPEAT)) {
server_client_set_key_table(c, NULL); server_client_set_key_table(c, NULL);
server_status_client(c); server_status_client(c);
return; return;

4
tty.c
View File

@ -159,8 +159,10 @@ tty_read_callback(__unused int fd, __unused short events, void *data)
int nread; int nread;
nread = evbuffer_read(tty->in, tty->fd, -1); nread = evbuffer_read(tty->in, tty->fd, -1);
if (nread == -1) if (nread == -1) {
event_del(&tty->event_in);
return; return;
}
log_debug("%s: read %d bytes (already %zu)", c->name, nread, size); log_debug("%s: read %d bytes (already %zu)", c->name, nread, size);
while (tty_keys_next(tty)) while (tty_keys_next(tty))

View File

@ -699,7 +699,7 @@ window_tree_key(struct window_pane *wp, struct client *c,
name = window_tree_get_target(item, &fs); name = window_tree_get_target(item, &fs);
window_pane_reset_mode(wp); window_pane_reset_mode(wp);
if (name != NULL) if (name != NULL)
mode_tree_run_command(c, &fs, command, name); mode_tree_run_command(c, NULL, command, name);
free(name); free(name);
free(command); free(command);
return; return;