Skip to content

Commit

Permalink
fix: todo comments was broken for non treesitter files. Fixes #150
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 8, 2022
1 parent a9df434 commit f244aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/todo-comments/highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function M.is_comment(buf, row, col)
local win = vim.fn.bufwinid(buf)
return win ~= -1
and vim.api.nvim_win_call(win, function()
for _, i1 in ipairs(vim.fn.synstack(1, 1)) do
for _, i1 in ipairs(vim.fn.synstack(row + 1, col)) do
local i2 = vim.fn.synIDtrans(i1)
local n1 = vim.fn.synIDattr(i1, "name")
local n2 = vim.fn.synIDattr(i2, "name")
Expand Down

0 comments on commit f244aa3

Please sign in to comment.