From a4c5c737b4eeeb1f4bf4c5698b17ed112191f868 Mon Sep 17 00:00:00 2001 From: Ilan Schemoul Date: Sun, 2 Aug 2026 11:13:18 +0200 Subject: [PATCH] fix(selection): allow empty line selection A common use case is to send the reference of an empty line to Claude for it to implement. Some guard clause prevents it. I see no good reason, it works without the condition and greatly improve the use case described above. --- lua/claudecode/selection.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/claudecode/selection.lua b/lua/claudecode/selection.lua index 441fc8dc..40076859 100644 --- a/lua/claudecode/selection.lua +++ b/lua/claudecode/selection.lua @@ -916,7 +916,7 @@ function M.send_at_mention_for_visual_selection(line1, line2) -- If range parameters are provided, use them (for :'<,'> commands) if line1 and line2 then sel_to_send = M.get_range_selection(line1, line2) - if not sel_to_send or sel_to_send.selection.isEmpty then + if not sel_to_send then logger.warn("selection", "Invalid range selection to send as at-mention.") return false end