=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/input.c,v retrieving revision 1.222 retrieving revision 1.223 diff -c -r1.222 -r1.223 *** src/usr.bin/tmux/input.c 2023/09/15 06:31:49 1.222 --- src/usr.bin/tmux/input.c 2023/12/27 20:13:35 1.223 *************** *** 1,4 **** ! /* $OpenBSD: input.c,v 1.222 2023/09/15 06:31:49 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: input.c,v 1.223 2023/12/27 20:13:35 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1846,1855 **** struct screen_write_ctx *sctx = &ictx->ctx; struct screen *s = sctx->s; struct window_pane *wp = ictx->wp; ! struct window *w = wp->window; u_int x = screen_size_x(s), y = screen_size_y(s); int n, m; m = 0; while ((n = input_get(ictx, m, 0, -1)) != -1) { switch (n) { --- 1846,1858 ---- struct screen_write_ctx *sctx = &ictx->ctx; struct screen *s = sctx->s; struct window_pane *wp = ictx->wp; ! struct window *w = NULL; u_int x = screen_size_x(s), y = screen_size_y(s); int n, m; + if (wp != NULL) + w = wp->window; + m = 0; while ((n = input_get(ictx, m, 0, -1)) != -1) { switch (n) { *************** *** 1878,1890 **** return; break; case 14: ! input_reply(ictx, "\033[4;%u;%ut", y * w->ypixel, x * w->xpixel); break; case 15: ! input_reply(ictx, "\033[5;%u;%ut", y * w->ypixel, x * w->xpixel); break; case 16: ! input_reply(ictx, "\033[6;%u;%ut", w->ypixel, w->xpixel); break; case 18: input_reply(ictx, "\033[8;%u;%ut", y, x); --- 1881,1902 ---- return; break; case 14: ! if (w == NULL) ! break; ! input_reply(ictx, "\033[4;%u;%ut", y * w->ypixel, ! x * w->xpixel); break; case 15: ! if (w == NULL) ! break; ! input_reply(ictx, "\033[5;%u;%ut", y * w->ypixel, ! x * w->xpixel); break; case 16: ! if (w == NULL) ! break; ! input_reply(ictx, "\033[6;%u;%ut", w->ypixel, ! w->xpixel); break; case 18: input_reply(ictx, "\033[8;%u;%ut", y, x); *************** *** 1914,1921 **** if (wp == NULL) break; notify_pane("pane-title-changed", wp); ! server_redraw_window_borders(wp->window); ! server_status_window(wp->window); break; } break; --- 1926,1933 ---- if (wp == NULL) break; notify_pane("pane-title-changed", wp); ! server_redraw_window_borders(w); ! server_status_window(w); break; } break;