File ChangeLog.LuaAPI changed (mode: 100644) (index a73d42089..466fd81f1) |
... |
... |
After that all changes will be documented in the regular ChangeLog. |
6 |
6 |
|
|
7 |
7 |
0.12.1 to current |
0.12.1 to current |
8 |
8 |
|
|
|
9 |
|
Bumped API version to v0.1.0 due to bug fixes and various additions. |
|
10 |
|
|
9 |
11 |
Additions to enabled standard libraries: |
Additions to enabled standard libraries: |
10 |
12 |
* os.getenv() |
* os.getenv() |
11 |
13 |
|
|
|
... |
... |
After that all changes will be documented in the regular ChangeLog. |
14 |
16 |
* running code before exit and when a file operation is done |
* running code before exit and when a file operation is done |
15 |
17 |
* starting background jobs to do something when they're over |
* starting background jobs to do something when they're over |
16 |
18 |
|
|
17 |
|
Changed VifmTab:getview() without arguments to return active pane of gtab. |
|
|
19 |
|
Changed description of VifmTab:getview() without arguments to return |
|
20 |
|
active pane of a global tab, which is what it was actually doing. |
18 |
21 |
|
|
19 |
22 |
Added vifm.executable() that check for an executable file or command in |
Added vifm.executable() that check for an executable file or command in |
20 |
23 |
$PATH. |
$PATH. |
File data/vim/doc/app/vifm-lua.txt changed (mode: 100644) (index 0d9c4f825..523d6f260) |
1 |
|
*vifm-lua.txt* For Vifm version 1.0 Last change: 2023 Mar 13 |
|
|
1 |
|
*vifm-lua.txt* For Vifm version 1.0 Last change: 2023 Mar 15 |
2 |
2 |
|
|
3 |
3 |
Email for bugs and suggestions: <xaizek@posteo.net> |
Email for bugs and suggestions: <xaizek@posteo.net> |
4 |
4 |
|
|
5 |
5 |
Note: this is very much work in progress. Everything can change up to |
Note: this is very much work in progress. Everything can change up to |
6 |
6 |
complete removal of this interface (that's an unlikely scenario though). |
complete removal of this interface (that's an unlikely scenario though). |
7 |
7 |
|
|
|
8 |
|
Current API version: v0.1.0 |
|
9 |
|
|
8 |
10 |
|vifm-lua-status| Status of plugins. |
|vifm-lua-status| Status of plugins. |
9 |
11 |
|vifm-lua-plugins| Sample plugins. |
|vifm-lua-plugins| Sample plugins. |
10 |
12 |
|vifm-lua-lua| Generic reasoning behind this API. |
|vifm-lua-lua| Generic reasoning behind this API. |
|
... |
... |
version.app.str (string) *vifm-l_vifm.version.app.str* |
1036 |
1038 |
Version of Vifm as a string. |
Version of Vifm as a string. |
1037 |
1039 |
|
|
1038 |
1040 |
version.api.major (integer) *vifm-l_vifm.version.api.major* |
version.api.major (integer) *vifm-l_vifm.version.api.major* |
1039 |
|
Major version of Lua API. 0 now, should become 1 when API design settles and |
|
|
1041 |
|
Major version of Lua API. Should become 1 when API design settles and then |
1040 |
1042 |
remain at 1. |
remain at 1. |
1041 |
1043 |
|
|
1042 |
1044 |
version.api.minor (integer) *vifm-l_vifm.version.api.minor* |
version.api.minor (integer) *vifm-l_vifm.version.api.minor* |
1043 |
|
Minor version of Lua API. 0 now. |
|
|
1045 |
|
Minor version of Lua API. |
1044 |
1046 |
|
|
1045 |
1047 |
version.api.patch (integer) *vifm-l_vifm.version.api.patch* |
version.api.patch (integer) *vifm-l_vifm.version.api.patch* |
1046 |
|
Patch version of Lua API. 0 now. |
|
|
1048 |
|
Patch version of Lua API. |
1047 |
1049 |
|
|
1048 |
1050 |
version.api.has({feature}) *vifm-l_vifm.version.api.has()* |
version.api.has({feature}) *vifm-l_vifm.version.api.has()* |
1049 |
1051 |
Checks presence of a feature. There are no features to test yet. |
Checks presence of a feature. There are no features to test yet. |
File tests/lua/api.c changed (mode: 100644) (index cba835ade..317fe7eef) |
... |
... |
TEST(vifm_version) |
280 |
280 |
"print(vifm.version.api.major," |
"print(vifm.version.api.major," |
281 |
281 |
" vifm.version.api.minor," |
" vifm.version.api.minor," |
282 |
282 |
" vifm.version.api.patch)")); |
" vifm.version.api.patch)")); |
283 |
|
assert_string_equal("0\t0\t0", ui_sb_last()); |
|
|
283 |
|
assert_string_equal("0\t1\t0", ui_sb_last()); |
284 |
284 |
|
|
285 |
285 |
ui_sb_msg(""); |
ui_sb_msg(""); |
286 |
286 |
assert_success(vlua_run_string(vlua, |
assert_success(vlua_run_string(vlua, |
|
... |
... |
TEST(vifm_version) |
290 |
290 |
ui_sb_msg(""); |
ui_sb_msg(""); |
291 |
291 |
assert_success(vlua_run_string(vlua, |
assert_success(vlua_run_string(vlua, |
292 |
292 |
"print(vifm.version.api.atleast(0, 0, 1))")); |
"print(vifm.version.api.atleast(0, 0, 1))")); |
293 |
|
assert_string_equal("false", ui_sb_last()); |
|
|
293 |
|
assert_string_equal("true", ui_sb_last()); |
294 |
294 |
|
|
295 |
295 |
ui_sb_msg(""); |
ui_sb_msg(""); |
296 |
296 |
assert_success(vlua_run_string(vlua, |
assert_success(vlua_run_string(vlua, |
297 |
297 |
"print(vifm.version.api.atleast(0, 1))")); |
"print(vifm.version.api.atleast(0, 1))")); |
|
298 |
|
assert_string_equal("true", ui_sb_last()); |
|
299 |
|
|
|
300 |
|
ui_sb_msg(""); |
|
301 |
|
assert_success(vlua_run_string(vlua, |
|
302 |
|
"print(vifm.version.api.atleast(0, 1, 1))")); |
|
303 |
|
assert_string_equal("false", ui_sb_last()); |
|
304 |
|
|
|
305 |
|
ui_sb_msg(""); |
|
306 |
|
assert_success(vlua_run_string(vlua, |
|
307 |
|
"print(vifm.version.api.atleast(0, 2))")); |
298 |
308 |
assert_string_equal("false", ui_sb_last()); |
assert_string_equal("false", ui_sb_last()); |
299 |
309 |
|
|
300 |
310 |
ui_sb_msg(""); |
ui_sb_msg(""); |