degesch: change arguments to handle_buffer_close()
This commit is contained in:
parent
85cebbcfa2
commit
b3a80630aa
11
degesch.c
11
degesch.c
|
@ -5913,14 +5913,14 @@ show_buffers_list (struct app_context *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_buffer_close (struct app_context *ctx, char *arguments)
|
handle_buffer_close (struct app_context *ctx, struct handler_args *a)
|
||||||
{
|
{
|
||||||
struct buffer *buffer = NULL;
|
struct buffer *buffer = NULL;
|
||||||
const char *which = NULL;
|
const char *which = NULL;
|
||||||
if (!*arguments)
|
if (!*a->arguments)
|
||||||
buffer = ctx->current_buffer;
|
buffer = a->buffer;
|
||||||
else
|
else
|
||||||
buffer = try_decode_buffer (ctx, (which = cut_word (&arguments)));
|
buffer = try_decode_buffer (ctx, (which = cut_word (&a->arguments)));
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
buffer_send_error (ctx, NULL, "%s: %s", "No such buffer", which);
|
buffer_send_error (ctx, NULL, "%s: %s", "No such buffer", which);
|
||||||
|
@ -5959,10 +5959,9 @@ handle_command_buffer (struct app_context *ctx, struct handler_args *a)
|
||||||
// we will probably need to extend liberty for this
|
// we will probably need to extend liberty for this
|
||||||
}
|
}
|
||||||
else if (!strcasecmp_ascii (action, "close"))
|
else if (!strcasecmp_ascii (action, "close"))
|
||||||
handle_buffer_close (ctx, a->arguments);
|
handle_buffer_close (ctx, a);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue