summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-21 10:19:36 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-21 10:19:36 +0000
commit2bd92e5f18b2d602bf28a0e6504fd9b3f5b5ba66 (patch)
treed80c01340bc3bd81a406b302f1b3a15c04a7e47b
parente5ab9a2db53ccae8ebaca25d8b24a0e5deaaa518 (diff)
Lose unnecessary flags on context.
-rw-r--r--TODO3
-rw-r--r--cfg.c3
-rw-r--r--cmd-attach-session.c4
-rw-r--r--cmd-command-prompt.c3
-rw-r--r--cmd-new-session.c4
-rw-r--r--key-bindings.c3
-rw-r--r--server-msg.c3
-rw-r--r--tmux.h5
8 files changed, 11 insertions, 17 deletions
diff --git a/TODO b/TODO
index c85afb01..e9fe5837 100644
--- a/TODO
+++ b/TODO
@@ -76,8 +76,9 @@
- 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
copy-buffer -s src-session -t dst-session -a src-index -b dst-index
- (from other session)
+ (from other session)
diff --git a/cfg.c b/cfg.c
index be55c51d..8a6729e5 100644
--- a/cfg.c
+++ b/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);
diff --git a/cmd-attach-session.c b/cmd-attach-session.c
index 3d82a243..1ebcb64d 100644
--- a/cmd-attach-session.c
+++ b/cmd-attach-session.c
@@ -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)
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c
index 2a93d730..45592a70 100644
--- a/cmd-command-prompt.c
+++ b/cmd-command-prompt.c
@@ -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);
}
diff --git a/cmd-new-session.c b/cmd-new-session.c
index 0baa5088..2671b495 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -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) {
diff --git a/key-bindings.c b/key-bindings.c
index 35b4ee3c..fe6ea46c 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -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);
}
diff --git a/server-msg.c b/server-msg.c
index 1419a85f..ad193fd7 100644
--- a/server-msg.c
+++ b/server-msg.c
@@ -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)) {
diff --git a/tmux.h b/tmux.h
index 6b72d2b9..f7f7a479 100644
--- a/tmux.h
+++ b/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 {