| File ChangeLog.LuaAPI changed (mode: 100644) (index 772ed4a23..09939dd40) |
| ... |
... |
documented in the regular ChangeLog. |
| 22 |
22 |
Fixed a crash on passing a value that's not convertible to a string to |
Fixed a crash on passing a value that's not convertible to a string to |
| 23 |
23 |
vifm.menus.loadcustom(). Thanks to PRESFIL. Patch by Kirill Rekhov. |
vifm.menus.loadcustom(). Thanks to PRESFIL. Patch by Kirill Rekhov. |
| 24 |
24 |
|
|
|
25 |
|
Fixed abort on running handlers if the code is built with -DNDEBUG. |
|
26 |
|
Thanks to Michał Majchrowicz and Marcin Wyczechowski. |
|
27 |
|
|
| 25 |
28 |
0.13 to 0.14-beta (2025-01-19) |
0.13 to 0.14-beta (2025-01-19) |
| 26 |
29 |
|
|
| 27 |
30 |
Bumped API version to v0.2.0. |
Bumped API version to v0.2.0. |
| File src/lua/vifm_handlers.c changed (mode: 100644) (index ec3e913dc..5672419a3) |
| ... |
... |
vifm_handlers_view(vlua_t *vlua, const char viewer[], const char path[], |
| 100 |
100 |
|
|
| 101 |
101 |
free(name); |
free(name); |
| 102 |
102 |
|
|
| 103 |
|
assert(lua_getfield(vlua->lua, -1, "handler") == LUA_TFUNCTION && |
|
| 104 |
|
"Handler must be a function here."); |
|
|
103 |
|
if(lua_getfield(vlua->lua, -1, "handler") != LUA_TFUNCTION) |
|
104 |
|
{ |
|
105 |
|
assert(0 && "A handler is not a function."); |
|
106 |
|
} |
| 105 |
107 |
|
|
| 106 |
108 |
lua_createtable(vlua->lua, /*narr=*/0, /*nrec=*/6); |
lua_createtable(vlua->lua, /*narr=*/0, /*nrec=*/6); |
| 107 |
109 |
lua_pushstring(vlua->lua, viewer); |
lua_pushstring(vlua->lua, viewer); |
| |
| ... |
... |
vifm_handlers_open(vlua_t *vlua, const char prog[], const dir_entry_t *entry) |
| 176 |
178 |
|
|
| 177 |
179 |
free(name); |
free(name); |
| 178 |
180 |
|
|
| 179 |
|
assert(lua_getfield(vlua->lua, -1, "handler") == LUA_TFUNCTION && |
|
| 180 |
|
"Handler must be a function here."); |
|
|
181 |
|
if(lua_getfield(vlua->lua, -1, "handler") != LUA_TFUNCTION) |
|
182 |
|
{ |
|
183 |
|
assert(0 && "A handler is not a function."); |
|
184 |
|
} |
| 181 |
185 |
|
|
| 182 |
186 |
lua_createtable(vlua->lua, /*narr=*/0, /*nrec=*/2); |
lua_createtable(vlua->lua, /*narr=*/0, /*nrec=*/2); |
| 183 |
187 |
lua_pushstring(vlua->lua, prog); |
lua_pushstring(vlua->lua, prog); |
| |
| ... |
... |
run_format_handler(vlua_t *vlua, const char handler[]) |
| 249 |
253 |
|
|
| 250 |
254 |
free(name); |
free(name); |
| 251 |
255 |
|
|
| 252 |
|
assert(lua_getfield(vlua->lua, -1, "handler") == LUA_TFUNCTION && |
|
| 253 |
|
"Handler must be a function here."); |
|
|
256 |
|
if(lua_getfield(vlua->lua, -1, "handler") != LUA_TFUNCTION) |
|
257 |
|
{ |
|
258 |
|
assert(0 && "A handler is not a function."); |
|
259 |
|
} |
| 254 |
260 |
|
|
| 255 |
261 |
lua_pushvalue(vlua->lua, -4); |
lua_pushvalue(vlua->lua, -4); |
| 256 |
262 |
|
|
| |
| ... |
... |
run_editor_handler(vlua_t *vlua, const char handler[]) |
| 393 |
399 |
|
|
| 394 |
400 |
free(name); |
free(name); |
| 395 |
401 |
|
|
| 396 |
|
assert(lua_getfield(vlua->lua, -1, "handler") == LUA_TFUNCTION && |
|
| 397 |
|
"Handler must be a function here."); |
|
|
402 |
|
if(lua_getfield(vlua->lua, -1, "handler") != LUA_TFUNCTION) |
|
403 |
|
{ |
|
404 |
|
assert(0 && "A handler is not a function."); |
|
405 |
|
} |
| 398 |
406 |
|
|
| 399 |
407 |
lua_pushvalue(vlua->lua, -4); |
lua_pushvalue(vlua->lua, -4); |
| 400 |
408 |
|
|