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-capture-pane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-capture-pane.c') diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c index e3c551ab..50bddc7c 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -48,7 +48,7 @@ const struct cmd_entry cmd_capture_pane_entry = { char * cmd_capture_pane_append(char *buf, size_t *len, char *line, size_t linelen) { - buf = xrealloc(buf, 1, *len + linelen + 1); + buf = xrealloc(buf, *len + linelen + 1); memcpy(buf + *len, line, linelen); *len += linelen; return (buf); -- 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-capture-pane.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd-capture-pane.c') diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c index 50bddc7c..ce60b4c5 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -41,7 +41,6 @@ const struct cmd_entry cmd_capture_pane_entry = { "[-aCeJpPq] " CMD_BUFFER_USAGE " [-E end-line] [-S start-line]" CMD_TARGET_PANE_USAGE, 0, - NULL, cmd_capture_pane_exec }; -- cgit