lua: Change CompletionRequested handler to use an event table. (#5280)

This commit is contained in:
Mm2PL
2024-03-30 15:23:02 +01:00
committed by GitHub
parent b35f10fa54
commit d4b8feac7d
8 changed files with 62 additions and 15 deletions
+3 -3
View File
@@ -98,8 +98,8 @@ public:
// Note: The CallbackFunction object's destructor will remove the function from the lua stack
using LuaCompletionCallback =
lua::CallbackFunction<lua::api::CompletionList, QString, QString, int,
bool>;
lua::CallbackFunction<lua::api::CompletionList,
lua::api::CompletionEvent>;
std::optional<LuaCompletionCallback> getCompletionCallback()
{
if (this->state_ == nullptr || !this->error_.isNull())
@@ -123,7 +123,7 @@ public:
// move
return std::make_optional<lua::CallbackFunction<
lua::api::CompletionList, QString, QString, int, bool>>(
lua::api::CompletionList, lua::api::CompletionEvent>>(
this->state_, lua_gettop(this->state_));
}