From a27ba6e38006c12c48de88600b8cff9f6aabfed7 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 8 Oct 2014 17:35:58 +0000 Subject: Add xreallocarray and remove nmemb argument from xrealloc. --- cmd-set-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-set-buffer.c') diff --git a/cmd-set-buffer.c b/cmd-set-buffer.c index 5a82b4d8..88bd0c10 100644 --- a/cmd-set-buffer.c +++ b/cmd-set-buffer.c @@ -104,7 +104,7 @@ cmd_set_buffer_exec(struct cmd *self, struct cmd_q *cmdq) memcpy(pdata, pb->data, psize); } - pdata = xrealloc(pdata, 1, psize + newsize); + pdata = xrealloc(pdata, psize + newsize); memcpy(pdata + psize, args->argv[0], newsize); psize += newsize; -- cgit From 45dfc5a074e2ceae11a6d4aeae597bee1e028503 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 20 Oct 2014 22:29:25 +0000 Subject: Instead of setting up the default keys by building the key struct directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon. --- cmd-set-buffer.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd-set-buffer.c') diff --git a/cmd-set-buffer.c b/cmd-set-buffer.c index 88bd0c10..0ec362b3 100644 --- a/cmd-set-buffer.c +++ b/cmd-set-buffer.c @@ -34,7 +34,6 @@ const struct cmd_entry cmd_set_buffer_entry = { "ab:n:", 0, 1, "[-a] " CMD_BUFFER_USAGE " [-n new-buffer-name] data", 0, - NULL, cmd_set_buffer_exec }; -- cgit