Skip to content

Commit

Permalink
temporarily neuter implementation of try_autocomplete
Browse files Browse the repository at this point in the history
to reduce danger of deadlocking
will be reverted in DFHack#5075
  • Loading branch information
myk002 committed Dec 6, 2024
1 parent e1ae82d commit e75ce39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@ void get_commands(color_ostream &con, std::vector<std::string> &commands) {
static bool try_autocomplete(color_ostream &con, const std::string &first, std::string &completed)
{
std::vector<std::string> commands, possible;
get_commands(con, commands);

// restore call to get_commands once we have updated the core lock to a deferred lock
// so calling Lua from the console thread won't deadlock if Lua is currently busy
//get_commands(con, commands);
for (auto &command : commands)
if (command.substr(0, first.size()) == first)
possible.push_back(command);
Expand Down

0 comments on commit e75ce39

Please sign in to comment.