Skip to content

Instantly share code, notes, and snippets.

@ThomasAdam
Created February 28, 2014 22:51
Show Gist options
  • Select an option

  • Save ThomasAdam/9281713 to your computer and use it in GitHub Desktop.

Select an option

Save ThomasAdam/9281713 to your computer and use it in GitHub Desktop.
diff --git a/window.c b/window.c
index 1dd70c4..d54a6af 100644
--- a/window.c
+++ b/window.c
@@ -422,6 +422,9 @@ window_pane_active_lost(struct window_pane *wp, struct window_pane *nextwp)
{
struct layout_cell *lc, *lc2;
+ if (nextwp->layout_cell->parent == NULL)
+ return;
+
/* Save the target pane in its parent. */
nextwp->layout_cell->parent->lastwp = nextwp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment