From fd041fde4054961aa73ed185f15c556af827df43 Mon Sep 17 00:00:00 2001 From: AnmiTaliDev Date: Fri, 18 Sep 2026 07:13:46 +0500 Subject: [PATCH] fix: Add tree-sitter dependency to CI and initialize line cap --- .github/workflows/ci.yml | 2 +- src/buffer.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f548d56..4e298f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - name: Install build tools run: | sudo apt-get update - sudo apt-get install -y meson ninja-build gcc + sudo apt-get install -y meson ninja-build gcc libtree-sitter-dev - name: Configure (release) run: meson setup build --buildtype=release diff --git a/src/buffer.c b/src/buffer.c index fa95c52..c5e144f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -41,6 +41,7 @@ static void buffer_append_line(buffer_t *buf, const char *data, size_t len) buffer_ensure_line_cap(buf, buf->num_lines + 1); line_t *line = &buf->lines[buf->num_lines]; line->chars = NULL; + line->cap = 0; line->len = 0; if (len > 0) { line_ensure_cap(line, len);