summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-06 14:31:32 -0500
committerpommicket <pommicket@gmail.com>2022-12-06 14:31:32 -0500
commite47e17a810962a20d9483222ee2908071c89984c (patch)
tree5b00bed8bdf5d9389ed86c44796a9ca87a9be9de
parent8242cd817017628db85f04ebf63cd328ec1e8eb3 (diff)
fix arr_set_len_, more future features
-rw-r--r--arr.c2
-rw-r--r--main.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/arr.c b/arr.c
index ae25a3c..d092e68 100644
--- a/arr.c
+++ b/arr.c
@@ -151,7 +151,7 @@ static void arr_set_len_(void **arr, size_t member_size, size_t n) {
ArrHeader *hdr = arr_hdr_(*arr);
if (n > hdr->len) {
// zero new elements
- memset((char *)hdr->data + hdr->len, 0, (n - hdr->len) * member_size);
+ memset((char *)hdr->data + hdr->len * member_size, 0, (n - hdr->len) * member_size);
}
hdr->len = (u32)n;
}
diff --git a/main.c b/main.c
index dbc49d5..c2e98dd 100644
--- a/main.c
+++ b/main.c
@@ -1,7 +1,11 @@
/*
FUTURE FEATURES:
+- regenerate tags for completion too if there are no results
- config variables
+- bind key to multiple commands
- plugins?
+- keyboard macros
+ - ctrl+9/0 to inc/dec number would be useful here
*/
#include "base.h"