Skip to content

Commit 05afda3

Browse files
Remove on_start from decoration provider, not necessary since on_win already filters out valid windows
1 parent 87cf006 commit 05afda3

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

lua/orgmode/colors/custom_highlighter.lua

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ local config = require('orgmode.config')
22
local namespace = vim.api.nvim_create_namespace('org_custom_highlighter')
33
local HideLeadingStars = nil
44
local MarkupHighlighter = nil
5-
local valid_bufnrs = {}
65

76
---@param bufnr number
87
local function apply_highlights(bufnr, line)
@@ -22,14 +21,6 @@ local function setup()
2221
MarkupHighlighter.setup()
2322

2423
vim.api.nvim_set_decoration_provider(namespace, {
25-
on_start = function(_, tick)
26-
local bufnr = vim.api.nvim_get_current_buf()
27-
if valid_bufnrs[bufnr] == tick or vim.bo[bufnr].filetype ~= 'org' then
28-
return false
29-
end
30-
valid_bufnrs[bufnr] = tick
31-
return true
32-
end,
3324
on_win = function(_, _, bufnr)
3425
return vim.bo[bufnr].filetype == 'org'
3526
end,

0 commit comments

Comments
 (0)