From 19843cd826c91a6f50ed109ea5d5477bf97becab Mon Sep 17 00:00:00 2001 From: Dane Jensen Date: Sat, 20 Jun 2026 12:22:08 -0700 Subject: [PATCH] bugfix There is a signature and functionality mismatch with the recent merge in `layout_floating_pane` that has been fixed. It now more gracefully handles inputs. --- layout.c | 6 ++++-- spawn.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/layout.c b/layout.c index db69f7cf..f717ac62 100644 --- a/layout.c +++ b/layout.c @@ -1429,9 +1429,11 @@ struct layout_cell * layout_floating_pane(struct window *w, struct window_pane *wp, u_int sx, u_int sy, int ox, int oy) { - struct layout_cell *lc = wp->layout_cell, *lcnew, *lcparent; + struct layout_cell *lc, *lcnew, *lcparent; - if (lc == NULL) + if (wp != NULL) + lc = wp->layout_cell; + else lc = w->layout_root; lcparent = lc->parent; diff --git a/spawn.c b/spawn.c index 975fd830..59e10729 100644 --- a/spawn.c +++ b/spawn.c @@ -660,7 +660,7 @@ spawn_editor(struct client *c, const char *buf, size_t len, px = w->sx / 2 - sx / 2; py = w->sy / 2 - sy / 2; window_push_zoom(w, 1, 0); - lc = layout_floating_pane(w, sx, sy, px, py); + lc = layout_floating_pane(w, NULL, sx, sy, px, py); if (lc == NULL) { spawn_editor_free(es); return (NULL);