Skip to content

Commit

Permalink
fix: one-off error for highlighting with treesitter/syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 13, 2022
1 parent b5bb014 commit 1602ce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/noice/text/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function NoiceText:highlight(bufnr, ns_id, linenr, byte_start)
end

if self.extmark.lang then
local range = { linenr - self.extmark.lines, 0, linenr, byte_start - 1 }
local range = { linenr - self.extmark.lines, 0, linenr, byte_start }
if Treesitter.has_lang(self.extmark.lang) then
Treesitter.highlight(bufnr, ns_id, range, self.extmark.lang)
else
Expand Down

0 comments on commit 1602ce8

Please sign in to comment.