* refactor(native_api_header): upgrade header files to Lua 5.4.
Almost all of the symbols in this file was from 5.2. This will obviously
not work because some function signatures have changed and some have
completely wrong return values, etc.
This commit updates the header files to Lua 5.4 based on the source code
and changes a few things.
* refactor(plugin_api): move the header into include/
* fix(lite_xl_plugin_api.h): include stdlib to avoid errors with exit
* refactor(lite_xl_plugin_api.h): do not return in SYMBOL_WRAP_CALL
* fix(lite_xl_plugin_api.h): fix wrong way of passing varargs
* fix(lite_xl_plugin_api.h): fix differing lua_rawlen definition
* fix(lite_xl_plugin_api.h): fix fallback function signature
* fix(lite_xl_plugin_api.h): fix conversion from void * to function pointer
This mistake escaped my eyes when reviewing #1437 and causes
some symbols to not be exported, because the preprocessor macros
are expecting multiple LUA versions to evaluate as true at once.
The fix is to replace `&&` with `||`.
* Fix incorrect check in doc:raw_remove
Restore caret position on command doc:cut
* merge cursors and fix new line in clipboard
* add new line to the last copied line
* Use Lua-provided string lengths for `system.path_compare`
* Make `system.path_compare` more case-aware
Before, strings like `README.md` would be sorted before `changelog.md`,
because we only looked at the raw ascii values.
Now the character case is considered as a secondary sorting key.
* feat(system): update api_require for more symbols
* fix(system): fix missing 5.1 symbols
* fix(system): add more missing symbols
* fix(system): add all symbols
We got'em this time. I swear.
* fix(system): fix undefined symbols due to conditional compilation
There is only pain and suffering.
Turns out some of the symbols are only exported when the options are enabled.
We need to preprocess the header.
* refactor(ci): use microsoft/setup-msbuild
* fix(ci): fix wrong option name for setup-msbuild
* fix(ci): bump setup-python version
* fix(lua-utf8-patch): enable support for windows vista and above
* fix(ci): use vs backend
* fix(ci): reconfigure project manually after patch
* fix(ci): add a separate build step
* fix(ci): use msvc-dev-cmd again
Instead of completely disabling them, we now use their internal toggle.
Also moved `drawwhitespace` commands inside the plugin.
---
* Fixed bug where commands would show even when plugin was disbled. Also removed antiquated way of disabling.
* Fixed typos.
* Also moved trimwhitespace out of config, if it already has a default enabled value of false.
* Changed documentation.
* Clarified comments.
* fix(gitignore): add exclusion for manifest files
* feat(windows): add application manifest
* feat(build): use application manifest on windows
* refactor(build): use genrate_file to generate the manifest
* style(manifest): remove trailing whitespace
* Warns user if trying to disable a plugin that is already
enabled when doing `config.plugins.plugin_name = false` and also
prevents replacing the current plugin config table with the false
value to mitigate runtime issues.
* Uses a merge strategy by default when assigning a table to a plugin
config to prevent a user from removing a plugin default config values
as experienced and explained on this issue lite-xl-plugins#158
* This change is basically backwards compatible, but will require a
change on the settings ui plugin on how it checks for already
enabled plugins, since rawget will no longer be a working hack
or workaround for this.
* As suggested by Adam dropped loaded key and switched to package.loaded
* fix Doc contextmenu not registering commands if scale plugin is not found
* fix TreeView contextmenu commands not working if the mouse hovers DocView
* add keyboard navigation to TreeView contextmenu
* fix incorrect contextmenu predicate
Co-Authored-By: vqn <85911372+vqns@users.noreply.github.com>
Thanks to Guldoman who discovered the cause for meson failing to
validate SSL certificates which turned out to be MSYS now requiring
ca-certificates package installed for the different architectures.
As discussed with Adam on discord current Lite XL Lua Plugin API was not
working on native plugins with more than 1 source file since imported
symbols were not exposed to other unit files. The issue was tackled on #1332
but the solution introduced another issue when Lite XL was dynamically
linked to the system lua. So we opted to tackle this by using function
wrappers around the function pointers.
* Stop drawing text past the `DocView` edge in `DocView:draw_line_text`
* Don't add draw commands if they fall outside the latest clip
The check was previously done with the window rect, so this will reduce
a bit more the number of commands sent.