mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 06:17:04 +00:00
unlink-window command. Also fix some u_int -> int problems.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-kill-window.c,v 1.2 2007-10-26 12:29:07 nicm Exp $ */
|
||||
/* $Id: cmd-kill-window.c,v 1.3 2007-10-26 16:57:32 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -60,7 +60,7 @@ cmd_kill_window_parse(void **ptr, int argc, char **argv, char **cause)
|
||||
while ((opt = getopt(argc, argv, "i:")) != EOF) {
|
||||
switch (opt) {
|
||||
case 'i':
|
||||
data->idx = strtonum(optarg, 0, UINT_MAX, &errstr);
|
||||
data->idx = strtonum(optarg, 0, INT_MAX, &errstr);
|
||||
if (errstr != NULL) {
|
||||
xasprintf(cause, "index %s", errstr);
|
||||
goto error;
|
||||
@ -106,7 +106,7 @@ cmd_kill_window_exec(void *ptr, struct cmd_ctx *ctx)
|
||||
return;
|
||||
}
|
||||
|
||||
destroyed = session_detach(s, wl);
|
||||
destroyed = session_detach(s, wl);
|
||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||
c = ARRAY_ITEM(&clients, i);
|
||||
if (c == NULL || c->session != s)
|
||||
|
Reference in New Issue
Block a user