aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-10-13 20:27:35 -0400
committerAdam Harrison <adamdharrison@gmail.com>2024-10-13 20:27:35 -0400
commit526c21d62b0688b6b5128cda72c35e4fcc996d91 (patch)
tree1a3165bbc2536306b4a414dc51921210c314eb2a
parent0cfe9e3c2bcd6fabd0c446cd03d60fd7d736ce19 (diff)
downloadlite-xl-plugin-manager-526c21d62b0688b6b5128cda72c35e4fcc996d91.tar.gz
lite-xl-plugin-manager-526c21d62b0688b6b5128cda72c35e4fcc996d91.zip
Fixed issue with fetch not receiving final progress update.
-rw-r--r--src/lpm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lpm.c b/src/lpm.c
index a3f984e..be19dec 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -652,8 +652,12 @@ static int lpm_fetchk(lua_State* L, int status, lua_KContext ctx) {
join_thread(context->thread);
git_repository_free(context->repository);
lua_pushstring(L, context->data[0] == 0 ? NULL : context->data);
- if (context->callback_function)
+ if (context->callback_function) {
+ lua_rawgeti(L, LUA_REGISTRYINDEX, context->callback_function);
+ lua_pushboolean(L, 1);
+ lua_pcall(L, 1, 0, 0);
luaL_unref(L, LUA_REGISTRYINDEX, context->callback_function);
+ }
luaL_unref(L, LUA_REGISTRYINDEX, (int)ctx);
if (context->error_code) {
return lua_error(L);