Skip to content

Commit 4775d1a

Browse files
fix(stars): Ignore stars node that end on column 0
This issue happens when deleting the headline
1 parent eb61f39 commit 4775d1a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/orgmode/colors/highlighter/stars.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ function OrgStars:on_line(bufnr, line)
3131

3232
local _, end_col = node:end_()
3333

34+
if end_col <= 0 then
35+
return
36+
end
37+
3438
vim.api.nvim_buf_set_extmark(bufnr, self.highlighter.namespace, line, 0, {
3539
end_row = line,
3640
end_col = end_col - 1,

0 commit comments

Comments
 (0)