Skip to content

Commit

Permalink
fix(send.lua): adjust iteration range in chain function to use pipe b…
Browse files Browse the repository at this point in the history
…lock node range for accurate node capture
  • Loading branch information
PMassicotte committed Feb 23, 2025
1 parent 294f63a commit 85a8ff3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/r/send.lua
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,9 @@ M.chain = function()
local sibling = nil
local visited = false

for id, node, _ in call_query:iter_captures(root, bufnr, cursor_row, cursor_row + 1) do
local pipe_start_row, _, pipe_end_row = pipe_block_node:range()

for id, node, _ in call_query:iter_captures(root, bufnr, pipe_start_row, pipe_end_row) do
local capture_name = call_query.captures[id]
local start_row, _, end_row = node:range()

Expand Down

0 comments on commit 85a8ff3

Please sign in to comment.