Skip to content

Commit 3b79d9d

Browse files
committed
fixup!: avoid boolean concat
1 parent 3057b7e commit 3b79d9d

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

lua/dap-view/exceptions/actions.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ M._toggle_exception_filter = function()
1919

2020
api.nvim_buf_set_lines(state.bufnr, cur_row - 1, cur_row, false, { content })
2121

22-
hl.hl_range(
23-
"NvimDapViewExceptionFilter" .. curent_option.enabled and "Enabled" or "Disabled",
24-
{ cur_row - 1, 0 },
25-
{ cur_row - 1, 4 }
26-
)
22+
local hl_type = curent_option.enabled and "Enabled" or "Disabled"
23+
hl.hl_range("NvimDapViewExceptionFilter" .. hl_type, { cur_row - 1, 0 }, { cur_row - 1, 4 })
2724

2825
exceptions.update_exception_breakpoints_filters()
2926
end

lua/dap-view/exceptions/view.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@ M.show = function()
3434
api.nvim_buf_set_lines(state.bufnr, 0, -1, false, content)
3535

3636
for i, opt in ipairs(state.exceptions_options) do
37-
hl.hl_range(
38-
"NvimDapViewExceptionFilter" .. opt.enabled and "Enabled" or "Disabled",
39-
{ i - 1, 0 },
40-
{ i - 1, 4 }
41-
)
37+
local hl_type = opt.enabled and "Enabled" or "Disabled"
38+
hl.hl_range("NvimDapViewExceptionFilter" .. hl_type, { i - 1, 0 }, { i - 1, 4 })
4239
end
4340
end
4441
end

0 commit comments

Comments
 (0)