Skip to content

Commit

Permalink
Fix console command completion help, again
Browse files Browse the repository at this point in the history
  • Loading branch information
NicksWorld committed Nov 29, 2024
1 parent 326475c commit a8f9852
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,13 @@ void get_commands(color_ostream &con, std::vector<std::string> &commands) {
con.printerr("Failed Lua call to helpdb.get_commands.\n");
}

Lua::GetVector(L, commands);
Lua::GetVector(L, commands, top + 1);
}

static bool try_autocomplete(color_ostream &con, const std::string &first, std::string &completed)
{
std::vector<std::string> commands, possible;

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 a8f9852

Please sign in to comment.