mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
There is no real need for window_printable_flags to allocate, make it
return a buffer from the stack.
This commit is contained in:
8
window.c
8
window.c
@ -710,11 +710,11 @@ window_destroy_panes(struct window *w)
|
||||
}
|
||||
|
||||
/* Retuns the printable flags on a window, empty string if no flags set. */
|
||||
char *
|
||||
const char *
|
||||
window_printable_flags(struct session *s, struct winlink *wl)
|
||||
{
|
||||
char flags[32];
|
||||
int pos;
|
||||
static char flags[32];
|
||||
int pos;
|
||||
|
||||
pos = 0;
|
||||
if (wl->flags & WINLINK_ACTIVITY)
|
||||
@ -732,7 +732,7 @@ window_printable_flags(struct session *s, struct winlink *wl)
|
||||
if (wl->window->flags & WINDOW_ZOOMED)
|
||||
flags[pos++] = 'Z';
|
||||
flags[pos] = '\0';
|
||||
return (xstrdup(flags));
|
||||
return (flags);
|
||||
}
|
||||
|
||||
struct window_pane *
|
||||
|
Reference in New Issue
Block a user