diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-06 09:46:23 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-06 09:46:23 +0000 |
commit | 103748d6adfe1b2d706cb0a1e1a128be5366d655 (patch) | |
tree | b9d4feef5012083d9c0ba96693322286645a27a3 /session.c | |
parent | 6f142e9ac61783e79c27e56ed6aa2fc7ff13683d (diff) |
Major reorganisation of screen handling.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,4 +1,4 @@ -/* $Id: session.c,v 1.29 2007-11-12 16:39:30 nicm Exp $ */ +/* $Id: session.c,v 1.30 2007-12-06 09:46:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -26,7 +26,7 @@ #include "tmux.h" /* Global session list. */ -struct sessions sessions; +struct sessions sessions; void session_cancelbell(struct session *s, struct winlink *wl) @@ -78,7 +78,7 @@ session_find(const char *name) if (s != NULL && strcmp(s->name, name) == 0) return (s); } - + return (NULL); } @@ -131,7 +131,7 @@ session_destroy(struct session *s) ARRAY_SET(&sessions, i, NULL); while (!ARRAY_EMPTY(&sessions) && ARRAY_LAST(&sessions) == NULL) ARRAY_TRUNC(&sessions, 1); - + while (!RB_EMPTY(&s->windows)) winlink_remove(&s->windows, RB_ROOT(&s->windows)); @@ -163,7 +163,7 @@ session_new(struct session *s, const char *name, const char *cmd, int idx) fatalx("session not found"); xsnprintf(buf, sizeof buf, "TMUX=%ld,%u", (long) getpid(), i); env[0] = buf; - + if ((w = window_create(name, cmd, env, s->sx, s->sy)) == NULL) return (NULL); return (session_attach(s, w, idx)); @@ -227,7 +227,7 @@ session_next(struct session *s) return (0); } -/* Move session to previous window. */ +/* Move session to previous window. */ int session_previous(struct session *s) { @@ -247,7 +247,7 @@ session_previous(struct session *s) return (0); } -/* Move session to specific window. */ +/* Move session to specific window. */ int session_select(struct session *s, int idx) { @@ -264,7 +264,7 @@ session_select(struct session *s, int idx) return (0); } -/* Move session to last used window. */ +/* Move session to last used window. */ int session_last(struct session *s) { @@ -273,7 +273,7 @@ session_last(struct session *s) wl = s->lastw; if (wl == NULL) return (-1); - if (wl == s->curw) + if (wl == s->curw) return (1); s->lastw = s->curw; |