Get x and y the right way round, fixes crash when opening a mode prompt

when the client is offset into the window; may be the crash reported by
sthen@.
This commit is contained in:
nicm
2026-09-22 16:56:07 +00:00
committed by Nicholas Marriott
parent a34d2b6b21
commit 92d29e54f4

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: screen-redraw.c,v 1.159 2026/09/09 08:31:42 nicm Exp $ */
/* $OpenBSD: screen-redraw.c,v 1.161 2026/09/22 16:56:07 nicm Exp $ */
/*
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1673,7 +1673,7 @@ redraw_draw_pane_prompt(struct redraw_draw_ctx *dctx, struct window_pane *wp)
prompt_draw(wp->prompt, &pdd);
screen_write_stop(&ctx);
tty_draw_line(tty, &screen, 0, offset, width, px, cy, NULL);
tty_draw_line(tty, &screen, offset, 0, width, px, cy, NULL);
screen_free(&screen);
}