summaryrefslogtreecommitdiffstats
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-09-27 09:52:03 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-09-27 09:52:03 +0000
commit22990a6595fdff840010aa6df9a60ada61331b5e (patch)
tree48fa49a39ca8ba91652d9e5bbdcc7a942462c183 /op.c
parent3fa8f1636486420b9f27b129dbd0f36015d4c24b (diff)
New session selection rules:
- find by name if given - otherwise try current index from $TMUX - otherwise if only one session, use it - otherwise error
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/op.c b/op.c
index 3c24c8b5..22377d80 100644
--- a/op.c
+++ b/op.c
@@ -1,4 +1,4 @@
-/* $Id: op.c,v 1.5 2007-09-26 19:38:42 nicm Exp $ */
+/* $Id: op.c,v 1.6 2007-09-27 09:52:03 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -93,7 +93,7 @@ op_attach(char *path, int argc, char **argv)
if (client_init(path, &cctx, 1) != 0)
return (1);
- strlcpy(data.name, name, sizeof data.name);
+ client_fill_sessid(&data.sid, name);
data.sx = cctx.ws.ws_col;
data.sy = cctx.ws.ws_row;
client_write_server(&cctx, MSG_ATTACH, &data, sizeof data);