From c7a6a735bc42a491efc8cb5c399d58b45c86aa18 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 16 Jul 2026 13:10:51 +0100 Subject: [PATCH] Another popup leftover. --- fuzz/input-fuzzer.c | 2 +- input.c | 14 +++----------- tmux.h | 2 +- window-copy.c | 2 +- window.c | 2 +- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/fuzz/input-fuzzer.c b/fuzz/input-fuzzer.c index 0e4415473..c7c5c99b5 100644 --- a/fuzz/input-fuzzer.c +++ b/fuzz/input-fuzzer.c @@ -44,7 +44,7 @@ LLVMFuzzerTestOneInput(const u_char *data, size_t size) w = window_create(PANE_WIDTH, PANE_HEIGHT, 0, 0); wp = window_add_pane(w, NULL, 0, 0); bufferevent_pair_new(libevent, BEV_OPT_CLOSE_ON_FREE, vpty); - wp->ictx = input_init(wp, vpty[0], NULL, NULL); + wp->ictx = input_init(wp, vpty[0], NULL); window_add_ref(w, __func__); wp->fd = open("/dev/null", O_WRONLY); diff --git a/input.c b/input.c index 0aac9bfbb..440373b7c 100644 --- a/input.c +++ b/input.c @@ -101,7 +101,6 @@ struct input_ctx { struct bufferevent *event; struct screen_write_ctx ctx; struct colour_palette *palette; - struct client *c; struct input_cell cell; struct input_cell old_cell; @@ -875,7 +874,7 @@ input_restore_state(struct input_ctx *ictx) /* Initialise input parser. */ struct input_ctx * input_init(struct window_pane *wp, struct bufferevent *bev, - struct colour_palette *palette, struct client *c) + struct colour_palette *palette) { struct input_ctx *ictx; @@ -883,7 +882,6 @@ input_init(struct window_pane *wp, struct bufferevent *bev, ictx->wp = wp; ictx->event = bev; ictx->palette = palette; - ictx->c = c; ictx->input_space = INPUT_BUF_START; ictx->input_buf = xmalloc(INPUT_BUF_START); @@ -3371,15 +3369,9 @@ input_osc_52(struct input_ctx *ictx, const char *p) return; if (wp == NULL) { - /* Popup window. */ - if (ictx->c == NULL) { - free(out); - return; - } - tty_set_selection(&ictx->c->tty, clip, out, outlen); - paste_add(NULL, out, outlen); + free(out); + return; } else { - /* Normal window. */ screen_write_start_pane(&ctx, wp, NULL); screen_write_setselection(&ctx, clip, out, outlen); screen_write_stop(&ctx); diff --git a/tmux.h b/tmux.h index 4fddc72df..a541e06e1 100644 --- a/tmux.h +++ b/tmux.h @@ -3375,7 +3375,7 @@ void recalculate_sizes_now(int); /* input.c */ #define INPUT_BUF_DEFAULT_SIZE 1048576 struct input_ctx *input_init(struct window_pane *, struct bufferevent *, - struct colour_palette *, struct client *); + struct colour_palette *); void input_free(struct input_ctx *); void input_reset(struct input_ctx *, int); struct evbuffer *input_pending(struct input_ctx *); diff --git a/window-copy.c b/window-copy.c index a6909a8d4..a7f3dcfda 100644 --- a/window-copy.c +++ b/window-copy.c @@ -663,7 +663,7 @@ window_copy_view_init(struct window_mode_entry *wme, data->backing = xmalloc(sizeof *data->backing); screen_init(data->backing, sx, screen_size_y(base), UINT_MAX); - data->ictx = input_init(NULL, NULL, NULL, NULL); + data->ictx = input_init(NULL, NULL, NULL); data->mx = data->cx; data->my = screen_hsize(data->backing) + data->cy - data->oy; data->showmark = 0; diff --git a/window.c b/window.c index d22717d8f..62578c401 100644 --- a/window.c +++ b/window.c @@ -1540,7 +1540,7 @@ window_pane_set_event(struct window_pane *wp) NULL, window_pane_error_callback, wp); if (wp->event == NULL) fatalx("out of memory"); - wp->ictx = input_init(wp, wp->event, &wp->palette, NULL); + wp->ictx = input_init(wp, wp->event, &wp->palette); bufferevent_enable(wp->event, EV_READ|EV_WRITE); }