mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Change the existing client flags for control mode to apply for any
client, use the same mechanism for the read-only flag and add an ignore-size flag. refresh-client -F has become -f (-F stays for backwards compatibility) and attach-session and switch-client now have -f flags also. A new format "client_flags" lists the flags and is shown by list-clients by default. This separates the read-only flag from "ignore size" behaviour (new ignore-size) flag - both behaviours are useful in different circumstances. attach -r and switchc -r remain and set or toggle both flags together.
This commit is contained in:
8
resize.c
8
resize.c
@ -72,17 +72,17 @@ ignore_client_size(struct client *c)
|
||||
return (1);
|
||||
if (c->flags & CLIENT_NOSIZEFLAGS)
|
||||
return (1);
|
||||
if (c->flags & CLIENT_READONLY) {
|
||||
if (c->flags & CLIENT_IGNORESIZE) {
|
||||
/*
|
||||
* Ignore readonly clients if there are any attached clients
|
||||
* that aren't readonly.
|
||||
* Ignore flagged clients if there are any attached clients
|
||||
* that aren't flagged.
|
||||
*/
|
||||
TAILQ_FOREACH (loop, &clients, entry) {
|
||||
if (loop->session == NULL)
|
||||
continue;
|
||||
if (loop->flags & CLIENT_NOSIZEFLAGS)
|
||||
continue;
|
||||
if (~loop->flags & CLIENT_READONLY)
|
||||
if (~loop->flags & CLIENT_IGNORESIZE)
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user