From ea13e19e554a7003e8a66b54fe5d78ff3ed984f2 Mon Sep 17 00:00:00 2001 From: "borja (aider)" Date: Wed, 30 Apr 2025 09:24:44 +0200 Subject: [PATCH] fix: Avoid error when checking line content --- lua/todoer/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/todoer/init.lua b/lua/todoer/init.lua index a61db23..674a06b 100644 --- a/lua/todoer/init.lua +++ b/lua/todoer/init.lua @@ -120,7 +120,8 @@ local function setup_buffer_keymaps() end -- Check if the line is a TODO item and if it has content after the marker - local has_content = details.content and not vim.trim(details.content):empty() + -- Use string.match with %S to check for any non-whitespace character + local has_content = details.content and string.match(details.content, "%S") if details.is_todo and has_content then -- Case 1: Non-empty TODO line