Implement commands to load a project from a directory and integrate
the project module within the core modules replacing the workspace
plugin.
Needs polishing but the basic functionalities are there.
Now we store doc.filename only and removed doc.abs_filename. The former
doc.filename is always the absolute filename.
We use now the variable core.working_dir to transform relative path into
absolute ones.
Roughly works but need more work and polishing. The workspace plugin
is temporarily disable waiting to be fixed.
Now the application does no longer 'chdir' into the project directory
and we removed the concept of project's directory (core.project_dir)
and project's files (core.project_files). Instead we have always a
project that can contain zero, one or many directories or files.
No directory is special within a project, there is no longer a concept
of project's directory.
WIP adapting open-file command to open a directory
Crash when adding a file into the project
If a non-existing file is specified with the command "core:open-file"
a new document is opened with the given filename provided the directory
already exists.
The flag new_file is set to true in the Doc instance.
The file will be actually created only when the "save" command is used.
The document will be marked with the "*" event when no changes are done
to mean that it is a new file and is not yet saved.
The function common.normalize_path now process the .. and . in the
filename. Before was not needed because system.absolute_path already
get rid of them but now we need to have the absolute path of files
that not yet exists so we cannot use system.absolute_path.
Use the function defined in the "common" module.
Move the check for not-nil filename from common.normalize_path
to core.open_doc. In this latter the filename can be nil if a
new unnamed document is created.
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