=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.272 retrieving revision 1.273 diff -c -r1.272 -r1.273 *** src/usr.bin/tmux/server-client.c 2019/03/18 20:53:33 1.272 --- src/usr.bin/tmux/server-client.c 2019/03/25 09:22:09 1.273 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.272 2019/03/18 20:53:33 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.273 2019/03/25 09:22:09 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 506,519 **** m->statusat = status_at_line(c); if (m->statusat != -1 && y >= (u_int)m->statusat && ! y < m->statusat + status_line_size(c)) sr = status_get_range(c, x, y - m->statusat); ! else ! sr = NULL; ! if (sr != NULL) { switch (sr->type) { case STYLE_RANGE_NONE: ! break; case STYLE_RANGE_LEFT: where = STATUS_LEFT; break; --- 506,518 ---- m->statusat = status_at_line(c); if (m->statusat != -1 && y >= (u_int)m->statusat && ! y < m->statusat + status_line_size(c)) { sr = status_get_range(c, x, y - m->statusat); ! if (sr == NULL) ! return (KEYC_UNKNOWN); switch (sr->type) { case STYLE_RANGE_NONE: ! return (KEYC_UNKNOWN); case STYLE_RANGE_LEFT: where = STATUS_LEFT; break; *************** *** 522,531 **** break; case STYLE_RANGE_WINDOW: wl = winlink_find_by_index(&s->windows, sr->argument); ! if (wl != NULL) { ! m->w = wl->window->id; ! where = STATUS; ! } break; } } --- 521,531 ---- break; case STYLE_RANGE_WINDOW: wl = winlink_find_by_index(&s->windows, sr->argument); ! if (wl == NULL) ! return (KEYC_UNKNOWN); ! m->w = wl->window->id; ! ! where = STATUS; break; } }