Skip to content

Commit a340162

Browse files
committed
fix: use lower case to compare
1 parent 5aa1fc3 commit a340162

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lua/cmake-tools/init.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ function cmake.run_current_file(opt)
11561156
local file = vim.fn.expand("%:p")
11571157
local all_targets = config:launch_targets_with_sources()
11581158
for i, target in ipairs(all_targets.data["sources"]) do
1159-
if target.path == file then
1159+
if target.path:lower() == file:lower() then
11601160
table.insert(targets, target.name)
11611161
table.insert(display_targets, target.display_name)
11621162
end
@@ -1187,7 +1187,7 @@ function cmake.build_current_file(opt)
11871187
local file = vim.fn.expand("%:p")
11881188
local all_targets = config:build_targets_with_sources()
11891189
for _, target in ipairs(all_targets.data["sources"]) do
1190-
if target.path == file then
1190+
if target.path:lower() == file:lower() then
11911191
table.insert(targets, target.name)
11921192
table.insert(display_targets, target.display_name)
11931193
end
@@ -1547,7 +1547,7 @@ function cmake.register_autocmd()
15471547
and all_targets.data["sources"]
15481548
then
15491549
for _, target in ipairs(all_targets.data["sources"]) do
1550-
if target.path == file then
1550+
if target.path:lower() == file:lower() then
15511551
table.insert(targets, { name = target.name, type = target.type })
15521552
end
15531553
end
@@ -1722,7 +1722,7 @@ function cmake.register_dap_function()
17221722
local file = vim.fn.expand("%:p")
17231723
local all_targets = config:launch_targets_with_sources()
17241724
for _, target in ipairs(all_targets.data["sources"]) do
1725-
if target.path == file then
1725+
if target.path:lower() == file:lower() then
17261726
table.insert(targets, target.name)
17271727
table.insert(display_targets, target.display_name)
17281728
end

0 commit comments

Comments
 (0)