Groups together consecutive mouse move events like done in core.step()
lua function but on the C side.
It does not introduce any meaningful speedup but it theory is more efficient and
simplifies the Lua code.
The simplification of the Lua code alone is enough to justify this change?
* Retrieve scale plugin from lite-plugins
* New implementation of scale plugin and font C API
Introduce two new C API functions, renderer.font.get_size and set_size
respectively to get the font size and to set the size to a new value.
Using these functions we don't need to know the name of the font but
we can just change their size.
Adapt the scale plugin to use the new C API function with minor adaptations
in the logic.
Use smaller step to scale fonts.
Rename font_desc_free function, previous name was misleading as only the cached
resources are freed.
* Add contextmenu plugin from takase
From https://github.com/takase1121/lite-contextmenu
Adapted to show font scaling commands and find/replace commands.
i# testing.lua
* Fix the cursor flickering with contextmenu
To avoid flickering of the cursor when using the context menu
we add a new function `core.request_cursor` that just take note
of the cursor requested.
The cursor will be actually changed only in root_view:draw() method
only when all the drawing operations are done. This means the cursor
will be changed only once per frame and only the most recent cursor
change request will take effect.
* Remove unneeded scale plugin return functions
Use regular expressions instead of Lua patterns for find and replace editor commands.
Syntax files can now use regex or Lua patterns as before keeping backward compatibility for plugins.
In order to stay simple and closer to the lite's design principles we
deprecate the core.add_save_hook function and the related mechanism.
Instead we now directly override the Doc:save() method.
The method is already overrided from core.init to add the automatic
reloading of style when user's module is saved.
The cleanup is related to the discussion in issue #229.
When the number of files in a project directory is above the max
limit switch back to a mechanism to read directory content only
when the corresponding folder is expanded in the treeview.
When the command core:find-file is invoked the command core:open-file
is executed instead because the complete list of the project's
files is not available.
When a project search is done we search through all the files within
the project dir without indexing them.
Address issues #217#203#183.
Useful to draw whitespaces with alternate characters and colors
without slowing down the text rendering.
A new API is implemented. A renderer.replacements object can be created
to list the replacements.
In turns the function renderer.draw_text and draw_text_subpixel now accept
two optional arguments for replacements.
Since we now load the user's module before the plugins\nwe avoid to log a line for each loaded plugin to not hide\nan eventual error in the user module
The path returned by temp_filename was not writeable on UNIX (and possibly other OS). This lead to the gitstatus plugin not working.
The proposed change fixes this by using the USERDIR variable instead of EXEDIR
It make sense to not put the initial '/' in the filename as the name
is relative to the top directory it belongs to.
By removing the the initial '/' in the filename we can re-introduce the
variable
core.project_files
to stay compatible with standard Lite. The project_files variable will
always point to the files table of the first entry of
core.project_directories.
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
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.
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'.
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.
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.
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
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#77Resolves#102