Move the nested check from client to server and compare the client tty

name to all the pane pty names instead of comparing socket paths. This
means that "new -d" will work without unsetting $TMUX.
This commit is contained in:
nicm
2015-06-04 23:27:51 +00:00
parent dc0d34e137
commit 6b2129696f
5 changed files with 42 additions and 25 deletions

4
tmux.h
View File

@ -1374,8 +1374,7 @@ struct cmd_entry {
const char *usage;
#define CMD_STARTSERVER 0x1
#define CMD_CANTNEST 0x2
#define CMD_READONLY 0x4
#define CMD_READONLY 0x2
int flags;
enum cmd_retval (*exec)(struct cmd *, struct cmd_q *);
@ -1868,6 +1867,7 @@ void server_update_socket(void);
void server_add_accept(int);
/* server-client.c */
int server_client_check_nested(struct client *);
void server_client_handle_key(struct client *, int);
void server_client_create(int);
int server_client_open(struct client *, char **);