Commit Graph
2299 Commits
Author SHA1 Message Date
Guldomanandtakase1121 1d0725f904 Improve text width calculation precision (#1408)
In some extreme cases (~30000 chars) text width precision takes a hit.
Using double instead of float fixes that.
2023-08-19 12:38:35 +08:00
Takase 32860c111e refactor(main): move SetProcessDPIAware to manifests (#1413) 2023-08-19 12:38:35 +08:00
Guldomanandtakase1121 8c47fad637 Split Command struct into different structs for each command type (#1407)
This reduces the space needed for each command.
2023-08-19 12:38:34 +08:00
Takase f685293417 Add manifest on Windows (#1405)
* 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
2023-08-19 12:38:34 +08:00
Guldomanandtakase1121 95611366bb Use correct view for scrolling to find-replace:repeat-find results (#1400) 2023-08-19 12:38:34 +08:00
vqnandtakase1121 067271bc02 fix incorrect x_offset if opened docs have different tab sizes (#1383) 2023-08-19 12:38:13 +08:00
Adamandtakase1121 c8f033ec8b Fixed up some post 5.1/jit Symbols (#1385)
* Updated k functions to have appropriate method signatures for 5.3 and up.

* Fixed up some inconsistent signatures that I forgot.
2023-08-19 12:38:13 +08:00
Guldomanandtakase1121 b0e524dd15 Improve DocView:get_visible_line_range precision (#1382) 2023-08-19 12:37:50 +08:00
Jefferson Gonzálezandtakase1121 24491bc3fd plugins scale: also rescale style.expanded_scrollbar_size (#1380) 2023-08-19 12:37:50 +08:00
Jefferson Gonzálezandtakase1121 70ed171612 NagView: properly rescale on scale change (#1379)
* drop font option since style.font is always used
2023-08-19 12:37:49 +08:00
Jefferson Gonzálezandtakase1121 6925c06599 Improved plugins config table handling (#1356)
* 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
2023-08-19 12:37:29 +08:00
Takase b95fdfcf5f fix: exec() error not returned to parent (#1363)
* fix: exec() error not returned to parent

* chore: remove accidental lua.h inclusion
2023-08-19 12:37:20 +08:00
takase1121andvqn 218ba3ebac Context menu fixes and keyboard navigation (#1338)
* 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>
2023-08-19 12:36:39 +08:00
Adamandtakase1121 017711b369 Getting rid of annoying forward slash on windows. (#1345) 2023-08-19 12:30:41 +08:00
jgmdevandtakase1121 b8eb6865a6 gh workflow: fix path to macOS arm64 cross file 2023-08-19 12:30:41 +08:00
Jefferson Gonzálezandtakase1121 03d11c869d ci: fix msys build now requiring ca-certificates (#1348)
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.
2023-08-19 12:30:41 +08:00
Janandtakase1121 a951c3cd39 pass RenWindow by argument (#1321)
* pass RenWindow to all renderer functions that need it

* pass RenWindow to all rencache functions that need it
2023-08-19 12:30:41 +08:00
Adam Harrisonandtakase1121 5907118683 Added missing header declaration. 2023-08-19 12:29:18 +08:00
Jefferson Gonzálezandtakase1121 95f18a1148 plugin api: allow usage on multiple source files (#1335)
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.
2023-08-19 12:29:18 +08:00
Guldomanandtakase1121 bddb5e274d Avoid drawing hidden text in DocView:draw_line_text (#1298)
* 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.
2023-08-19 12:28:48 +08:00
Janandtakase1121 d54a5d0672 remove static libgcc from meson (#1290) 2023-08-19 12:28:48 +08:00
Adam Harrisonandtakase1121 4c18cf6744 Updated dummy method signature to match prototypes. 2023-08-19 12:28:48 +08:00
Guldomanandtakase1121 a9d8f12cb7 Make empty groups in regex.gmatch return their offset (#1325)
This makes `regex.gmatch` behave like `string.gmatch`.
2023-08-19 12:28:47 +08:00
xwiiandtakase1121 38fa9f976c Use table.move to implement common.splice (#1324)
* Use `table.move` to implement `common.splice`

* Disallow negative `remove` in `common.splice`
2023-08-19 12:28:47 +08:00
adityarajandtakase1121 ae218bc005 Create Renderer Only When It Doesn't Exist (#1315) 2023-08-19 12:28:21 +08:00
Janandtakase1121 c8afe3d1bf replace uses of SDL_Window with RenWindow (#1319)
Since Renwindow contains our instance of SDL_Window we can use this
to simplify future logic to create separate window instances
2023-08-19 12:28:21 +08:00
Takase 2d0ddc302f Reorganize resources/ + wasm target (#1244)
* add README.md to resources directory
* add cross/ directory for meson cross files
* fix readme list syntax error
* fix reflink
* disable ASYNCIFY_ADVISE by default
* use executable names instead of hardcoding paths
2023-08-19 12:28:21 +08:00
jgmdevandtakase1121 291e7eab6f packaging: use master branch for plugin addons 2023-08-19 12:28:21 +08:00
sammyetteandtakase1121 1984573214 fix: center title and version in emptyview (#1311)
* fix: divide by amount of lines
2023-08-19 12:28:21 +08:00
Janandtakase1121 f5a224999a defer lua error until after cleanup (#1310) 2023-08-19 12:28:20 +08:00
Jefferson Gonzálezandtakase1121 4b6134a839 plugin api: added missing luaL_typeerror (#1313) 2023-08-19 12:28:20 +08:00
jgmdevandtakase1121 60f0e3f3da Packaging Scripts: updated widgets install location 2023-08-19 12:28:20 +08:00
Guldomanandtakase1121 f00f41b468 linewrapping: Disable horizontal scrolling when enabled (#1309) 2023-08-19 12:28:20 +08:00
Julien Voisinandtakase1121 1ab320bb9b Handle readlink errors (#1292) 2023-08-19 12:28:19 +08:00
Guldomanandtakase1121 138cea45d5 Make dirwatch sorting compatible with what file_bisect expects (#1300)
The result of `a.filename < b.filename` is sometimes different from 
`system.path_compare(a.filename, a.type, b.filename, b.type)` which 
causes issues to `file_bisect`, as it expects the sorting to be done 
with `system.path_compare`.
2023-08-19 12:28:19 +08:00
Julien Voisinandtakase1121 d86413cc30 Don't set a value twice (#1306) 2023-08-19 12:28:19 +08:00
Julien Voisinandtakase1121 d06c9f401c Fix a memory leak (#1305)
`font` was not freed upon error.
2023-08-19 12:28:19 +08:00
Julien Voisinandtakase1121 d755fa6fba Make api_require's nodes const (#1296) 2023-08-19 12:28:18 +08:00
Takase 69ce580970 do not allow users to create an empty font group (#1303) 2023-08-19 12:28:18 +08:00
Guldomanandtakase1121 bd4e64cc7e Allow command buffer to be expanded (#1297) 2023-08-19 12:28:18 +08:00
Daveandtakase1121 0fa0a59c8b Minor typos in init text 2023-08-19 12:28:18 +08:00
Jefferson GonzálezandGitHub 3491eb464d Bump version to 2.1.1 (#1284)
* updated wraps
* updated release date
2022-12-28 22:03:36 -04:00
jgmdev 79908baed6 regex: properly call pcre2_jit_compile 2022-12-28 19:40:20 -04:00
Guldoman 74349f8e56 Fix horizontal scroll with touchpad on MacOS 2022-12-28 17:26:57 +01:00
Jefferson GonzálezandGitHub 870d685b59 contextmenu: adjust y positioning if less than zero (#1268)
* use clamp for both x and y coords
2022-12-28 02:51:24 -04:00
Quinten KockandGitHub 3fda8c0a09 Fix userdata APIs for Lua 5.4 in native plugin interface (#1188)
* Reintroduce some missing Lua API's from native plugin API

* Add new upvalue functions to header

* Fix things that are actually macros in current lua

* Introduce lua_insert,replace,remove macros from lua5.4
2022-12-27 23:39:28 -05:00
Jefferson GonzálezandGitHub 141d00795c dirmonitor: use pipes on fsevents (#1274)
As suggested by Guldoman this change introduces the usage
of pipes to allow blocking the get changes call until any
file system changes are received, which now properly reduces
the cpu usage on idle to 0%.

This change better fixes #1237
2022-12-27 23:07:12 -04:00
xwiiandGitHub 271a804986 Fix popping subsyntaxes that end consecutively (#1246) 2022-12-27 20:24:52 -04:00
Simon KrauterandGitHub 8603644726 Fix two typos in data/init.lua (#1272) 2022-12-27 19:56:30 -04:00
Martin AshbyandGitHub d4989d98bd Add example settings to _overwrite_ an existing key binding (#1270) 2022-12-27 18:40:22 -05:00