Skip to content

Commit

Permalink
fix: always highlight the full line
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Dec 20, 2024
1 parent b26d638 commit f6c99b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/treesitter-context/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ local function get_text_for_range(range, bufnr)
end_row = end_row - 1
end

if end_col == -1 then
-- Adjust the end row to include the whole line. If we decide to clip
-- at the end column, then we also need to adjust lines.
-- if end_col == -1 then
if end_col ~= 0 then
end_col = 0
end_row = end_row + 1
end
Expand Down

0 comments on commit f6c99b6

Please sign in to comment.