* fix: free-before-init in renwin_init_surface when using sdl renderer
`ren->rensurface.surface` presupposes zero-initialized rensurface.
Rensurface was not actually zero-initialized.
It is now.
* fix: heap buffer overflow in process_env_free
`process_env_free` presupposed that it was null-terminated.
Pass length to free instead.
* use calloc instead of memset for zero-init
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* fix nagbar failed save message
- visually separated statements with a `.`
- first statement slightly rewritten
- use `'` rather than `"`
* yeahhhh no back to `"`
* feat(process): allow commands and envs on proces_start
* refactor(process): copy process arguments once whenever possible
Refactors the code to use an arglist type which is just lpCmdline on Windows
and a list in Linux.
The function automatically escapes the command when it is needed, avoiding
a second copy.
This also allows UTF-8 commands btw.
* fix(process): fix invalid dereference
* refactor(process): mark xstrdup as potentially unused
* feat(process): add parent process environment when launching process
* fix(process): fix operator precedence with array operators
* fix(process): fix segfault when freeing random memory
* fix(process): fix wrong check for setenv()
* fix(process): fix accidentally initializing an array by assignment
* fix(process): clear return value if success
* added text overwriting
* rewrote `DocView:draw_caret` to not use the order of draws
* forgot to delete some old code in `DocView:draw_overlay`
also added a temporary solution to overwriting
and added the missing arguments in `DocView:draw_ime_decoration`
and fixed `DocView:draw_caret`
* accidentally broke the `draw_caret` call in `draw_overlay` in the process
* multiline
* fixed calling `Doc:get_char` as a function
that, in turn, crashed the editor because "can't index a number"
* move and rename some stuff
* remove unneeded extra check
I just had to change the `~=` to `<` in the second condition
* overwrite disregards pasting text
* disregard overwrite on selections; doc only removes selection
* Fixed error where `doc` was used, instead of `self`.
---------
Co-authored-by: ThaCuber <70547062+ThaCuber@users.noreply.github.com>
Co-authored-by: Adam Harrison <adamdharrison@gmail.com>
* Avoid adding existing selections in `select_add_next`
* Use the first available selection as delimiter in `select_add_next`
* Fix returning searches with newlines in `search.find`
* Fix repeat search when the last result spanned multiple lines
* Execute at least one step when window has no focus
This way if `core.redraw` is set, it's respected.
* Fully run threads at least once when window has no focus
This allows threads that set `core.redraw` (like `projectsearch`) to
continue running even after the window loses focus.
"Fully" here means that `run_threads` has gone through *all* the "timed
out" coroutines at least once.
* feat(subprojects): update SDL2 wrap
* fix(meson.build): add sdl2main as dependency on Windows
* fix(meson.build): don't load sdl2main on non-Windows platforms
* feat(subprojects): update freetype version
* feat(subprojects): update pcre2 to latest version
* feat(subprojects): update lua to latest version
* feat(lite_xl_plugin_api): add lua_closethread to symbols list
* fix(meson.build): fix meson error with features and booleans
* fix(meson.build): fix wrong variable name
* feat(subprojects): update wraps again
* ci(build): fix lua subproject not found
* ci(build): use awk instead of grep and sed
* Use `PATHSEP` in path-related functions
* Don't stop on digits when getting the common part in `system.path_compare`
* Avoid sorting multiple times in `dirwatch.get_directory_files`
This also fixes the timeout detection in `recurse_pred`.
When `time_to_wake` was <= 0, so when a coroutine needed to be executed
as soon as possible, we didn't check for events, so we only performed a
`core.step` with the blink timer.
This resulted in jerky reactions to input.
* Fixed issue with set_target_size passing the wrong value to plugins that are split on the right and activated from the settings UI.
* Added position awareness for the all resize_child_node calls.