Commit Graph

246 Commits

Author SHA1 Message Date
Francesco Abbate f882957ebc Experimentally add priority run when scanning project files
Avoid yielding when a first scan is required but seems quite
ineffective.
2020-12-08 16:59:05 +01:00
Francesco Abbate e88adc0567 Move project manager into core init file 2020-12-08 16:57:57 +01:00
Francesco Abbate ebaa2b4f26 Fix bug related to creation of user's init file 2020-12-07 17:38:36 +01:00
Francesco Abbate ca9bf21819 Reword name for identifying primary view 2020-12-06 13:24:55 +01:00
Francesco Abbate 23575b309e Fix syntax error with previous commit 2020-12-06 11:37:05 +01:00
Francesco Abbate 1c4b8cf315 Fix documentation and behavior for 1.13 release 2020-12-06 11:23:33 +01:00
Francesco Abbate 926e004c41 Preliminary version of project manager
Adapted from contribute rxi/lite-plugins but changed to avoid restarting
the application when switching project.

Current problem:
- the reload of the treeview take some time without any feedback for the
  user
2020-12-06 00:57:27 +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 70412b520b Fix cursor blinking problem
The problem was that when the editor had no events the cursor was not
blinking because the event loop was blocking on wait_event.

Now we no longer calls wait_event without a timeout if the windows has
the focus. When the window has the focus the timeout is set to 1 / fps
so that the cursor can blinks.

In addition we react to the "focus lost" event to ensure the documents
are redrawn without the cursor.
2020-11-21 16:36:32 +01:00
Francesco Abbate 82dc76dd00 Add recently visited files in the list when using find file command 2020-11-16 23:52:51 +01:00
Francesco Abbate 16e6a6db9d Stop scanning project file when a maximum limit is reached
To avoid excessive memory usage when opening in a directory with too many files.

Introduce the config variable config.max_project_files to choose the limit.

The mechanism introduced avoid using excessive memory but it fails to
let user access all the files in the directory. A better implementation
should not impose any limits but read each subdirectory on-demand, only
as they are expanded in the tree-view.
2020-11-16 18:12:55 +01:00
Francesco Abbate edaa8fb42b Add a mechanism to avoid blank window at startup 2020-11-16 14:49:41 +01:00
Francesco Abbate fe0dda8309 Merge remote-tracking branch 'rxi/master' into agg-font-renderer 2020-06-16 15:00:47 +02:00
Francesco Abbate 2c6bd874fa Avoid running when there are no events and threads do not need to run 2020-06-16 14:54:08 +02:00
rxi 7517d0ef55 Changed EXEDIR to be used as default project dir 2020-06-13 08:56:13 +01:00
rxi 7fbefe40d5 Made `system.set_window_title` only be called on title change 2020-05-30 08:53:48 +01:00
rxi 74755f5b4a Simplified implementation of `core.temp_filename()` 2020-05-27 11:38:42 +01:00
rxi 064b6d0b95 Fixed changing of cwd and loading of commandline files
the current-working-directory is now set at the start of `core.init` after the
absolute path for all filename arguments have been resolved
2020-05-26 10:26:20 +01:00
rxi 257b9ab753 Added `core.temp_filename()` 2020-05-25 08:58:12 +01:00
rxi c2d27ab3f7 Removed `core.project_dir` 2020-05-24 13:50:32 +01:00
rxi 82e33dd2de Moved event-waiting when not focused to after run_threads() 2020-05-24 13:43:34 +01:00
rxi 946c125fd4 Changed `core.redraw` to be set to `true` by default
As the window isn't created until the first frame is drawn this is required to
assure the window is ever shown without relying on the assumption that some
other part of the program would have set this to true
2020-05-24 08:04:47 +01:00
rxi 28b1844a8b Added support for dropping a folder onto the window 2020-05-23 11:31:08 +01:00
rxi 7aabfebfa0 Fixed mouse-position resolution when dropping a file 2020-05-20 10:33:08 +01:00
rxi 08ce7e2563 Fixed stuck mouse-drag-selection on dropped-file
Resolves #109
2020-05-20 09:52:01 +01:00
rxi bc4bf3d384 Added core.set_active_view(); removed `focusable` boolean from View 2020-05-19 14:55:46 +01:00
rxi 8ec717f240 Added temporary backwards compatibility for `core.project_dir` 2020-05-18 10:28:01 +01:00
rxi 4ae0d477c0 Made lite set project dir to CWD; removed core.project_dir
Fixes #100
2020-05-17 17:05:56 +01:00
rxi 4644154e5b Added `config.ignore_files`
Filenames that match either the single pattern provided by
`config.ignore_files`, or any pattern in a table of patterns, will be ignored
when lite is filling the `core.project_files` table

Resolves #77
Resolves #102
2020-05-17 13:38:45 +01:00
rxi c215eff6d8 Improved idle CPU utilisation when not-focused, added system.wait_event() 2020-05-11 00:21:07 +01:00
rxi a651d48e84 Wrapped `core.on_event` calls in `core.try` 2020-05-09 08:38:51 +01:00
rxi 22171fa802 Simplified core.step() 2020-05-08 20:44:53 +01:00
rxi de94c8a13c Removed unused variables in core.init 2020-05-07 22:25:52 +01:00
rxi 5acc391288 Added logging when project module is loaded 2020-05-07 13:41:39 +01:00
rxi 73996e3dc9 Changed core to store `modified` and `size` in project_files table 2020-05-06 17:03:10 +01:00
rxi 5361bfaf9c Added open-[project|user]-module commands, renamed command/file finder commands 2020-05-06 14:48:04 +01:00
rxi 271e5434d0 Added support for a `.lite_project.lua` file in project directory 2020-05-06 13:29:35 +01:00
rxi 7610e1064f Added multiline support for LogView's messages 2020-05-06 00:06:27 +01:00
rxi 439537d63e Fixed format string passed to core.error() in core.try() 2020-04-26 21:40:25 +01:00
rxi accf09c4f9 Changed printed filenames to use format-specifier "%s" instead of %q
Fixes #22
2020-04-25 13:26:55 +01:00
rxi c658b6f1ca Removed underscore from start of globals, added VERSION
eg. `_SCALE` => `SCALE`
prevents conflict with lua's own _NAME globals
2020-04-25 09:58:01 +01:00
rxi 9a32a00c73 Made core.log/error store call location instead of view 2020-04-22 00:02:35 +01:00
rxi 73e96c2641 Made project_scan_thread() ignore directories it can't open
Should fix #30 and #7
2020-04-21 23:43:35 +01:00
rxi 4191cf2c08 Added `core.try` wrapping of function passed to `core.add_thread` 2020-04-21 23:23:34 +01:00
rxi d8c4bfa6ba Initial commit 2019-12-28 11:17:56 +00:00