From b23c0f2014a78d7854b8005e3d036e990bd2ba43 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 9 Sep 2022 13:58:47 +0530 Subject: tailwind: Fix detach when attach is executed multiple times --- lua/colorizer/buffer_utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/colorizer/buffer_utils.lua') diff --git a/lua/colorizer/buffer_utils.lua b/lua/colorizer/buffer_utils.lua index a3b3da7..4ee3cfe 100644 --- a/lua/colorizer/buffer_utils.lua +++ b/lua/colorizer/buffer_utils.lua @@ -140,7 +140,7 @@ local function highlight_buffer_tailwind(buf, ns, mode, options) table.insert(d, { name = name, range = { first_col, end_col } }) datas[cur_line] = d end - add_highlight(options, buf, ns, datas, line_start, line_end + 2) + add_highlight(options, buf, ns, datas, line_start or 0, line_end and (line_end + 2) or -1) end end) end, 10) -- cgit v1.2.3-70-g09d2