mirror of
https://github.com/tmux/tmux.git
synced 2025-01-05 23:38:48 +00:00
Tweak ordering.
This commit is contained in:
parent
248f78d29a
commit
f145108258
12
session.c
12
session.c
@ -1,4 +1,4 @@
|
||||
/* $Id: session.c,v 1.11 2007-09-21 18:31:58 nicm Exp $ */
|
||||
/* $Id: session.c,v 1.12 2007-09-21 18:35:16 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -130,16 +130,16 @@ int
|
||||
session_detach(struct session *s, struct window *w)
|
||||
{
|
||||
window_remove(&s->windows, w);
|
||||
if (ARRAY_EMPTY(&s->windows)) {
|
||||
session_destroy(s);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (s->last == w)
|
||||
s->last = NULL;
|
||||
if (s->window == w && session_last(s) != 0 && session_previous(s) != 0)
|
||||
session_next(s);
|
||||
|
||||
if (!ARRAY_EMPTY(&s->windows))
|
||||
return (0);
|
||||
session_destroy(s);
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Return if session has window. */
|
||||
|
Loading…
Reference in New Issue
Block a user