diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-05-08 21:12:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-05-08 21:12:52 +0000 |
commit | 583c885d68bc567789451db25e49a3fac36f194c (patch) | |
tree | 7d25e82a7155a6977cb5069ce280f4fe18de3b3e | |
parent | acfabf3a50c05a576435c1bc86f36af07362b529 (diff) |
Reset last pane on swap-pane across windows, fixes crash noticed by hsim
at gmx.li.
-rw-r--r-- | cmd-swap-pane.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd-swap-pane.c b/cmd-swap-pane.c index 8e0662dd..aa133faf 100644 --- a/cmd-swap-pane.c +++ b/cmd-swap-pane.c @@ -129,6 +129,12 @@ cmd_swap_pane_exec(struct cmd *self, struct cmd_ctx *ctx) if (dst_w->active == dst_wp) window_set_active_pane(dst_w, src_wp); } + if (src_w != dst_w) { + if (src_w->last == src_wp) + src_w->last = NULL; + if (dst_w->last == dst_wp) + dst_w->last = NULL; + } server_redraw_window(src_w); server_redraw_window(dst_w); |