Commit Graph

62 Commits

Author SHA1 Message Date
lqdev 6195b246a5 ignore SIGPIPE from subprocesses spawned with reproc 2021-06-18 11:17:36 -04:00
Ferdinand Prantl 1eabf99054
Enable lite-xl to be started from a symlink to the deployed binary (#249)
Use resolved executablePath instead of resourcePath to allow lanching
the lite-xl binary via a symlink, like typically done by Homebrew:

/usr/local/bin/lite-xl -> /Applications/lite-xl.app/Contents/MacOS/lite-xl

The resourcePath returns /usr/local in this case instead of
/Applications/lite-xl.app/Contents/Resources, which makes later
access to the resource files fail. Resolving the symlink to the
executable and then the relative path to the expected directory
Resources is a workaround for starting the application from both
the launcher directly and the command line via the symlink.
2021-06-03 21:48:15 +02:00
Francesco Abbate aa0b2bb5fc Fix crash problem with rencache and font access
In some cases rencache was using a FontDesc pointer that was actually freed by
Lua giving segfaults errors.

In addition, some FontDesc object were not freed in some cases if the
rencache_end_frame was not called when performing the "restart" command.

The invalid access problem can happen because rencache keep some pointers to
FontDesc object but these are Lua userdata that Lua can dispose of. This
situation is prone to hard errors and we should avoid to keep pointers to
objects managed by Lua.

To this purpose we use luaL_ref/unref to bind the FontDesc into the Lua's
registry while rencache need them. We still keeps pointer to FontDesc object but
using luaL_ref we are assured they will not be disposed by Lua.

Since we are using luaL_ref/unref to inform the GC about when the objects are in
use we can now finalize the objects directly when Lua collects them. Previously
the GC metamethods was issuing a FREE command to rencache and the font was
actually freed only from the rencache_end_frame function.
2021-05-21 23:38:54 +02:00
Francesco Abbate d8244120e9 Ensure the rencache commands buffer is cleared on restart
Fix issue #176 but it should be tested more thoroughly.
2021-05-05 09:32:24 +02:00
Francesco Abbate 33fe7295c0 First working implemention
Cleanup also debug messages
2021-04-23 14:54:25 +02:00
Francesco Abbate 685b8c82d0 WIP: testing usage of SDL renderer
It does segfault.
2021-04-23 11:58:53 +02:00
Francesco Abbate 12ca5f3d2a Add momentum scroll for macos
Taken from @mathewmariani lite-macos
2021-04-21 09:52:16 +02:00
Francesco Abbate 2f8c70ac51 Remove bundle_open.h file 2021-04-19 09:52:00 +02:00
Francesco Abbate 53f77a29ea Implement correctly loading from macos bundle resources 2021-04-18 08:51:31 -07:00
Francesco Abbate f913a8513f Testing functions to open files from bundle 2021-04-18 17:08:35 +02:00
Takase 49cde08ed6
Use Xlib to read resources (#142) 2021-04-02 16:43:21 +02:00
Francesco Abbate 30f9f20e23 Ensure xrdb code is compiled only on unix 2021-03-17 18:10:47 +01:00
Francesco Abbate dab39d3b5c Implement xrdb reading without popen
Avoid using the shell, awk and cut command
2021-03-17 16:58:44 +01:00
daubaris 27f3cb23d4
Addressing the scaling factor on linux. (#107)
Use xrdb and the Xft.dpi variable to find out DPI scaling on linux.
2021-03-14 16:13:26 +01:00
Francesco Abbate 23a053e1ee Ensure error and stack trace are written to stdout
To address https://github.com/franko/lite-xl/issues/87
2021-03-07 09:48:44 +01:00
Francesco Abbate 09332fe242 Fix problem with fatal error message
Previous implementation was broken.

Ensure the error file is always written and write its location in the error message
2021-03-05 23:46:41 +01:00
Francesco Abbate a4bc8986ff Implement fatal error message box
Used when lite-xl fails at startup
2021-03-05 10:33:50 +01:00
Francesco Abbate 636bc7ec95 More accurate EXEDIR detection
Use ony the OS path separator to parse the executable filename
2021-03-05 09:42:48 +01:00
Francesco Abbate 1ea497deb4 Fix problem when launching from a different location
Should fix https://github.com/franko/lite-xl/issues/76 and https://github.com/franko/lite-xl/issues/67
2021-03-05 07:28:29 +01:00
Francesco Abbate 351a772466 do not use 'portable' as a compile time option
Introduce the file core/start.lua to initialize applications variables
2021-02-24 16:29:39 +01:00
Francesco Abbate 9fced84a7a Move VERSION variable into Lua code
To avoid recreating binaries if there are no changes
in the C side of the source code.
2021-02-16 14:35:02 +01:00
Francesco Abbate 882413e92d Bump 1.16 version number 2021-01-13 16:52:27 +01:00
Francesco Abbate d3686bb6f4 Bump new version number 2020-12-31 11:27:35 +01:00
Francesco Abbate 35c87462a6 Use ~ for HOME directory in folder search 2020-12-19 16:31:42 +01:00
Francesco Abbate e50d67df85 Update readme and changelog for release 1.14 2020-12-13 13:04:29 +01:00
Francesco Abbate 1fc0409163 Merge branch 'project-manager' 2020-12-12 20:27:07 +01:00
Francesco Abbate 6409b67ea2 Add core:restart function to restart the editor 2020-12-10 12:44:01 +01:00
Francesco Abbate 1c4b8cf315 Fix documentation and behavior for 1.13 release 2020-12-06 11:23:33 +01:00
Francesco Abbate be189fda0d Always use HOME based user's config independently from portable option 2020-12-04 12:01:49 +01:00
Francesco Abbate c41dedafad Improve the implementation of unix-like directories usage
Add a Meson option "portable" to choose between "portable" and unix-like
directories. Add information about this option in the README.

To determine the user's directory use the variable USERPROFILE only on
Windows and use HOME otherwise.

Implement the "portable" option in the package build script.
2020-12-03 16:46:18 +01:00
Francesco Abbate 277186491a Fix some problems with user's directory
To accommodate the Window's platform prefer the USERPROFILE to HOME
to set user's dir.

Fix error, user's dir was not added to the package.path.
2020-12-02 16:43:35 +01:00
Francesco Abbate a337f893d9 Implement user's config as init file and add directory into package.path
Create the user's config init file if lite user's config directory does
not exists.

No longer use the awkward package.searchers but instead add user's
config dir at the end of package path.
2020-12-02 16:03:31 +01:00
Francesco Abbate 3589d7d3c0 First implementation of unix-like data directory
It basically works by setting the data directory to

$prefix/share/lite-xl

where $prefix is determined so that $prefix/bin corresponds to EXEDIR.

The packages 'user' and 'user.*' are loaded from the directory
'$HOME/.config/lite-xl'.
2020-12-02 00:23:15 +01:00
Francesco Abbate 1c5767d393 Merge remote-tracking branch 'rxi/master' 2020-08-19 10:08:32 +02:00
rxi 91c43dc01e Version 1.11 2020-07-05 10:56:39 +01:00
Francesco Abbate 14ec61511d Merge remote-tracking branch 'rxi/master' 2020-07-04 22:08:25 +02:00
Francesco Abbate 77a9819f4e Fix SDL2 include directives 2020-06-29 15:24:08 +02:00
rxi 87532a4b3a Version 1.10 2020-06-28 14:40:07 +01:00
rxi 11df722162 Version 1.09 2020-06-21 19:38:42 +01:00
rxi 1db1f0bceb Version 1.08 2020-06-14 13:33:23 +01:00
rxi 95b70b1b16 Revert "Removed __APPLE__ `#ifdef` from main.c"
This reverts commit 6a7e214d1c.
2020-06-11 15:05:39 +01:00
rxi db471c0554 Version 1.07 2020-06-07 14:02:45 +01:00
rxi 6a7e214d1c Removed __APPLE__ `#ifdef` from main.c 2020-06-07 08:57:57 +01:00
Daniele Laudani 95ee03fb37
move BYPASS_COMPOSITOR near other SetHint 2020-06-03 15:05:55 +02:00
Daniele Laudani 7aa462e43d
Don't tell the system to disable compositing under X11
Fixes #123
2020-06-03 14:38:44 +02:00
rxi f00d5d55df Version 1.06 2020-05-31 16:53:53 +01:00
rxi b96609b7b8 Removed redundant __APPLE__ case in get_scale() 2020-05-29 09:33:42 +01:00
rxi 61a2a2c4e5 Version 1.05 2020-05-24 13:52:10 +01:00
rxi c1f731e5a1 Fixed EXEDIR having trailing slash 2020-05-17 16:58:32 +01:00
rxi adad2a65be Version 1.04 2020-05-17 14:58:44 +01:00