Disable/enable window activity monitoring with set-window-option command.

This commit is contained in:
Nicholas Marriott
2008-06-04 17:54:27 +00:00
parent 14b9512546
commit 0f95671fe3
8 changed files with 239 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-rename-window.c,v 1.18 2008-06-03 16:55:09 nicm Exp $ */
/* $Id: cmd-rename-window.c,v 1.19 2008-06-04 17:54:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -118,15 +118,10 @@ cmd_rename_window_exec(void *ptr, struct cmd_ctx *ctx)
if (data == NULL)
return;
if ((s = cmd_find_session(ctx, data->cname, data->sname)) == NULL)
wl = cmd_find_window(ctx, data->cname, data->sname, data->idx, &s);
if (wl == NULL)
return;
if (data->idx == -1)
wl = s->curw;
else if ((wl = winlink_find_by_index(&s->windows, data->idx)) == NULL) {
ctx->error(ctx, "no window %d", data->idx);
return;
}
xfree(wl->window->name);
wl->window->name = xstrdup(data->newname);