Skip to content

Commit 591ae37

Browse files
committed
fix: remove schedule_wrap
1 parent 25d42d4 commit 591ae37

1 file changed

Lines changed: 17 additions & 21 deletions

File tree

lua/cmake-tools/init.lua

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,27 +1181,23 @@ function cmake.run_test(opt, callback)
11811181
return
11821182
end
11831183
table.insert(all_tests, 1, "all")
1184-
vim.ui.select(
1185-
all_tests,
1186-
{ prompt = "select test to run" },
1187-
vim.schedule_wrap(function(_, idx)
1188-
if not idx then
1189-
return
1190-
end
1191-
if idx == 1 then
1192-
ctest.run(const.ctest_command, "'.*'", config:build_directory_path(), env, config, opt)
1193-
else
1194-
ctest.run(
1195-
const.ctest_command,
1196-
all_tests[idx],
1197-
config:build_directory_path(),
1198-
env,
1199-
config,
1200-
opt
1201-
)
1202-
end
1203-
end)
1204-
)
1184+
vim.ui.select(all_tests, { prompt = "select test to run" }, function(_, idx)
1185+
if not idx then
1186+
return
1187+
end
1188+
if idx == 1 then
1189+
ctest.run(const.ctest_command, "'.*'", config:build_directory_path(), env, config, opt)
1190+
else
1191+
ctest.run(
1192+
const.ctest_command,
1193+
all_tests[idx],
1194+
config:build_directory_path(),
1195+
env,
1196+
config,
1197+
opt
1198+
)
1199+
end
1200+
end)
12051201
end)
12061202
end
12071203

0 commit comments

Comments
 (0)