mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Lose unnecessary flags on context.
This commit is contained in:
		
							
								
								
									
										1
									
								
								TODO
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								TODO
									
									
									
									
									
								
							@@ -76,6 +76,7 @@
 | 
			
		||||
- list-keys should be sorted
 | 
			
		||||
- document buffer stuff
 | 
			
		||||
- copy-mode enhancements: next word etc etc
 | 
			
		||||
- problems with force-width when wrapping line in emacs?
 | 
			
		||||
---
 | 
			
		||||
save-buffer -b number filename
 | 
			
		||||
load-buffer -b number filename
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								cfg.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								cfg.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: cfg.c,v 1.11 2008-06-19 21:20:24 nicm Exp $ */
 | 
			
		||||
/* $Id: cfg.c,v 1.12 2008-06-21 10:19:36 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -94,7 +94,6 @@ load_cfg(const char *path, char **cause)
 | 
			
		||||
		ctx.info = cfg_print;
 | 
			
		||||
 | 
			
		||||
		ctx.cmdclient = NULL;
 | 
			
		||||
		ctx.flags = 0;
 | 
			
		||||
 | 
			
		||||
		cfg_cause = NULL;
 | 
			
		||||
		cmd_exec(cmd, &ctx);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: cmd-attach-session.c,v 1.19 2008-06-18 22:21:51 nicm Exp $ */
 | 
			
		||||
/* $Id: cmd-attach-session.c,v 1.20 2008-06-21 10:19:36 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -48,7 +48,7 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx)
 | 
			
		||||
	struct session		*s;
 | 
			
		||||
	char			*cause;
 | 
			
		||||
 | 
			
		||||
	if (ctx->flags & CMD_KEY)
 | 
			
		||||
	if (ctx->curclient != NULL)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if ((s = cmd_find_session(ctx, data->target)) == NULL)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: cmd-command-prompt.c,v 1.2 2008-06-19 21:20:25 nicm Exp $ */
 | 
			
		||||
/* $Id: cmd-command-prompt.c,v 1.3 2008-06-21 10:19:36 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -90,7 +90,6 @@ cmd_command_prompt_callback(void *data, char *s)
 | 
			
		||||
	ctx.info = key_bindings_info;
 | 
			
		||||
 | 
			
		||||
	ctx.cmdclient = NULL;
 | 
			
		||||
	ctx.flags = CMD_KEY;
 | 
			
		||||
 | 
			
		||||
	cmd_exec(cmd, &ctx);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: cmd-new-session.c,v 1.29 2008-06-19 22:04:02 nicm Exp $ */
 | 
			
		||||
/* $Id: cmd-new-session.c,v 1.30 2008-06-21 10:19:36 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -118,7 +118,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
 | 
			
		||||
	char				*cmd, *cause;
 | 
			
		||||
	u_int				 sx, sy;
 | 
			
		||||
 | 
			
		||||
	if (ctx->flags & CMD_KEY)
 | 
			
		||||
	if (ctx->curclient != NULL)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (!data->flag_detached) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: key-bindings.c,v 1.34 2008-06-20 17:31:48 nicm Exp $ */
 | 
			
		||||
/* $Id: key-bindings.c,v 1.35 2008-06-21 10:19:36 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -215,7 +215,6 @@ key_bindings_dispatch(int key, struct client *c)
 | 
			
		||||
	ctx.info = key_bindings_info;
 | 
			
		||||
 | 
			
		||||
	ctx.cmdclient = NULL;
 | 
			
		||||
	ctx.flags = CMD_KEY;
 | 
			
		||||
 | 
			
		||||
	cmd_exec(bd->cmd, &ctx);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: server-msg.c,v 1.47 2008-06-18 22:21:51 nicm Exp $ */
 | 
			
		||||
/* $Id: server-msg.c,v 1.48 2008-06-21 10:19:36 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -147,7 +147,6 @@ server_msg_fn_command(struct hdr *hdr, struct client *c)
 | 
			
		||||
	ctx.cursession = NULL;
 | 
			
		||||
 | 
			
		||||
	ctx.cmdclient = c;
 | 
			
		||||
	ctx.flags = 0;
 | 
			
		||||
 | 
			
		||||
	/* XXX */
 | 
			
		||||
	if (data.pid != -1 && (cmd->entry->flags & CMD_CANTNEST)) {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: tmux.h,v 1.159 2008-06-20 18:45:35 nicm Exp $ */
 | 
			
		||||
/* $Id: tmux.h,v 1.160 2008-06-21 10:19:36 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -725,9 +725,6 @@ struct cmd_ctx {
 | 
			
		||||
	void		(*print)(struct cmd_ctx *, const char *, ...);
 | 
			
		||||
	void		(*info)(struct cmd_ctx *, const char *, ...);
 | 
			
		||||
	void		(*error)(struct cmd_ctx *, const char *, ...);
 | 
			
		||||
 | 
			
		||||
#define CMD_KEY 0x1
 | 
			
		||||
	int		flags;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct cmd {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user