mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Keep stack of previous windows.
Check for op (orig_pair) for default colours.
This commit is contained in:
28
window.c
28
window.c
@ -1,4 +1,4 @@
|
||||
/* $Id: window.c,v 1.50 2008-09-26 06:45:28 nicm Exp $ */
|
||||
/* $Id: window.c,v 1.51 2008-11-16 10:10:26 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -164,6 +164,32 @@ winlink_previous(unused struct winlinks *wwl, struct winlink *wl)
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
winlink_stack_push(struct winlink_stack *stack, struct winlink *wl)
|
||||
{
|
||||
if (wl == NULL)
|
||||
return;
|
||||
|
||||
winlink_stack_remove(stack, wl);
|
||||
SLIST_INSERT_HEAD(stack, wl, sentry);
|
||||
}
|
||||
|
||||
void
|
||||
winlink_stack_remove(struct winlink_stack *stack, struct winlink *wl)
|
||||
{
|
||||
struct winlink *wl2;
|
||||
|
||||
if (wl == NULL)
|
||||
return;
|
||||
|
||||
SLIST_FOREACH(wl2, stack, sentry) {
|
||||
if (wl2 == wl) {
|
||||
SLIST_REMOVE(stack, wl, winlink, sentry);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct window *
|
||||
window_create(const char *name,
|
||||
const char *cmd, const char **envp, u_int sx, u_int sy, u_int hlimit)
|
||||
|
Reference in New Issue
Block a user