=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** src/usr.bin/tmux/server-client.c 2010/02/06 18:47:41 1.29 --- src/usr.bin/tmux/server-client.c 2010/02/06 22:55:31 1.30 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.29 2010/02/06 18:47:41 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.30 2010/02/06 22:55:31 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 271,276 **** --- 271,278 ---- /* Special case: number keys jump to pane in identify mode. */ if (c->flags & CLIENT_IDENTIFY && key >= '0' && key <= '9') { + if (c->flags & CLIENT_READONLY) + return; wp = window_pane_at_index(w, key - '0'); if (wp != NULL && window_pane_visible(wp)) window_set_active_pane(w, wp); *************** *** 279,293 **** } /* Handle status line. */ ! status_message_clear(c); ! server_clear_identify(c); if (c->prompt_string != NULL) { ! status_prompt_key(c, key); return; } /* Check for mouse keys. */ if (key == KEYC_MOUSE) { if (options_get_number(oo, "mouse-select-pane")) { window_set_active_at(w, mouse->x, mouse->y); server_redraw_window_borders(w); --- 281,300 ---- } /* Handle status line. */ ! if (!(c->flags & CLIENT_READONLY)) { ! status_message_clear(c); ! server_clear_identify(c); ! } if (c->prompt_string != NULL) { ! if (!(c->flags & CLIENT_READONLY)) ! status_prompt_key(c, key); return; } /* Check for mouse keys. */ if (key == KEYC_MOUSE) { + if (c->flags & CLIENT_READONLY) + return; if (options_get_number(oo, "mouse-select-pane")) { window_set_active_at(w, mouse->x, mouse->y); server_redraw_window_borders(w); *************** *** 313,321 **** c->flags |= CLIENT_PREFIX; else { /* Try as a non-prefix key binding. */ ! if ((bd = key_bindings_lookup(key)) == NULL) ! window_pane_key(wp, c, key); ! else key_bindings_dispatch(bd, c); } return; --- 320,329 ---- c->flags |= CLIENT_PREFIX; else { /* Try as a non-prefix key binding. */ ! if ((bd = key_bindings_lookup(key)) == NULL) { ! if (!(c->flags & CLIENT_READONLY)) ! window_pane_key(wp, c, key); ! } else key_bindings_dispatch(bd, c); } return; *************** *** 329,335 **** c->flags &= ~CLIENT_REPEAT; if (isprefix) c->flags |= CLIENT_PREFIX; ! else window_pane_key(wp, c, key); } return; --- 337,343 ---- c->flags &= ~CLIENT_REPEAT; if (isprefix) c->flags |= CLIENT_PREFIX; ! else if (!(c->flags & CLIENT_READONLY)) window_pane_key(wp, c, key); } return; *************** *** 340,346 **** c->flags &= ~CLIENT_REPEAT; if (isprefix) c->flags |= CLIENT_PREFIX; ! else window_pane_key(wp, c, key); return; } --- 348,354 ---- c->flags &= ~CLIENT_REPEAT; if (isprefix) c->flags |= CLIENT_PREFIX; ! else if (!(c->flags & CLIENT_READONLY)) window_pane_key(wp, c, key); return; } *************** *** 660,666 **** { struct cmd_ctx ctx; struct cmd_list *cmdlist = NULL; - struct cmd *cmd; int argc; char **argv, *cause; --- 668,673 ----