mirror of https://github.com/tmux/tmux.git
Correctly handle window ops with no pane, GitHub issue 3747.
parent
4dea352dee
commit
f028445407
24
input.c
24
input.c
|
@ -1846,10 +1846,13 @@ input_csi_dispatch_winops(struct input_ctx *ictx)
|
||||||
struct screen_write_ctx *sctx = &ictx->ctx;
|
struct screen_write_ctx *sctx = &ictx->ctx;
|
||||||
struct screen *s = sctx->s;
|
struct screen *s = sctx->s;
|
||||||
struct window_pane *wp = ictx->wp;
|
struct window_pane *wp = ictx->wp;
|
||||||
struct window *w = wp->window;
|
struct window *w = NULL;
|
||||||
u_int x = screen_size_x(s), y = screen_size_y(s);
|
u_int x = screen_size_x(s), y = screen_size_y(s);
|
||||||
int n, m;
|
int n, m;
|
||||||
|
|
||||||
|
if (wp != NULL)
|
||||||
|
w = wp->window;
|
||||||
|
|
||||||
m = 0;
|
m = 0;
|
||||||
while ((n = input_get(ictx, m, 0, -1)) != -1) {
|
while ((n = input_get(ictx, m, 0, -1)) != -1) {
|
||||||
switch (n) {
|
switch (n) {
|
||||||
|
@ -1878,13 +1881,22 @@ input_csi_dispatch_winops(struct input_ctx *ictx)
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
input_reply(ictx, "\033[4;%u;%ut", y * w->ypixel, x * w->xpixel);
|
if (w == NULL)
|
||||||
|
break;
|
||||||
|
input_reply(ictx, "\033[4;%u;%ut", y * w->ypixel,
|
||||||
|
x * w->xpixel);
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
input_reply(ictx, "\033[5;%u;%ut", y * w->ypixel, x * w->xpixel);
|
if (w == NULL)
|
||||||
|
break;
|
||||||
|
input_reply(ictx, "\033[5;%u;%ut", y * w->ypixel,
|
||||||
|
x * w->xpixel);
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
input_reply(ictx, "\033[6;%u;%ut", w->ypixel, w->xpixel);
|
if (w == NULL)
|
||||||
|
break;
|
||||||
|
input_reply(ictx, "\033[6;%u;%ut", w->ypixel,
|
||||||
|
w->xpixel);
|
||||||
break;
|
break;
|
||||||
case 18:
|
case 18:
|
||||||
input_reply(ictx, "\033[8;%u;%ut", y, x);
|
input_reply(ictx, "\033[8;%u;%ut", y, x);
|
||||||
|
@ -1914,8 +1926,8 @@ input_csi_dispatch_winops(struct input_ctx *ictx)
|
||||||
if (wp == NULL)
|
if (wp == NULL)
|
||||||
break;
|
break;
|
||||||
notify_pane("pane-title-changed", wp);
|
notify_pane("pane-title-changed", wp);
|
||||||
server_redraw_window_borders(wp->window);
|
server_redraw_window_borders(w);
|
||||||
server_status_window(wp->window);
|
server_status_window(w);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue