This behavior might be unwanted when changing project settings which
is unrelated to project base path and also fixes filebrowser behavior
with the updated way project-save signal is emitted.
The patch also handles the situation where "realized" is called after
project-save is called and overrides file browser's path (which is
something we don't want).
For some reason "project-save" isn't emitted when closing project - see
write_config(FALSE) in project_close(). This means that in this case
plugins cannot save their configuration into the config file. This doesn't
even correspond to the documentation of the signal
"Sent when a project is saved (happens when the project is created, the
properties dialog is closed or Geany is exited)"
as the signal isn't emitted when exiting Geany because at this point Geany
closes the project.
The comment seems to indicate that the reason is that "project-save"
shouldn't be emitted when "project-close" is emitted but I don't see any
reason why.
Bump API so plugins can rely on the changed behavior.
Increment one time for both, and fix the corresponding doc comments.
The comment for keybindings_load_keyfile() is reflowed to split into
brief/detail sections properly.
This indicates that TMTag is GBoxed-derived, and can be copied/ref'd.
This helps plugins that must store a tag pointer for later usage while the
tagmanager might let it go in the meantime (can happen quickly if the user
comments a function out when starting a doxygen-comment).
Closes#1465
Since filedef config files are now stored under the "filedef" subdirectory
of app->datadir, we need to add the subdirectory name when creating path
from the corresponding app->configdir otherwise the file isn't found.
Closes#1482
* Add missing string and comment styles for various lexers
A bunch of string and comment styles were missing and so Geany could not
detect the corresponding styles in code.
* Add more string styles
* Add regex styles as string styles
Do not allow more than one plugin manager dialog at a time. It doesn't
make sense and the code is not fully re-entrant and leads to a crash
toggling plugins in both dialogs.
Fixes#1563.
The variable used for setting the cursor isn't used anymore and
was used uninitialized. It's simply deleted now and the correct var is used.
This was only a problem if editor_insert_text_block() was used directly,
the snippet code path doesn't reach to it.
* Update Scintilla to version 3.7.5
This now requires a C++11-capable compiler.
Closes#1308.
* Test using newer dist on Travis
Since Scintilla needs C++11
* Add debugging code for when configure fails
* Workaround a pkg-config-corsswrapper bug on Ubuntu 14.04
See https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1327242
* snippets: Allow keybinding overloading of snippet-next-cursor.
This allows to use the same key as for inserting snippets, or plugins to
map something to the same keybinding (e.g. if they implement a similar facility).
* snippets: Remove cursor position at the end of constructs.
This is not consistently done for all languages, and hard to get right
e.g. for python. It's probably not terribly useful either.
* snippets: Use Scintilla indicators for cursor posititons
* api: Increment API version.
* snippets: restore behavior of cursor-less snippets
* snippts: use ascii character for the placeholder.
Do not require documents to be UTF-8 for using snippets.
* snippets: fix start/end detection, when searching for the next cursor
Tested @vfaronov
When option is enabled geany automatically reloads files which
have changed on disk but have no changes in the buffer.
When the option is disabled (default) geany shows the reload
dialog as before.
Tested @vfaronov
* Update obsolete references to GLib 2.27/28 in HACKING
Fixes#1476.
* Replace obsolete gcc -W option with -Wextra in HACKING
According to gcc --help=warnings, -W is a deprecated option
and -Wextra should be used instead.
Escaped newlines were properly handled inside preprocessor directives,
but not otherwise.
Seeing `continue` here suggests the code used to work a long time ago
but some loop refactoring broke it, as now it would not stay in the
loop unless in a preprocessor directive. Or maybe it only ever worked
for preprocessor directives, and the `continue` was superfluous?
Fixes#1370.
When plugin calls plugin_set_key_group() several times for the same
group (when creating keybindings dynamically and needs to reset them),
it crashes with the current code the second time it gets called.
The reason is that group->plugin_keys is an array into which entries of
group->key_items point and when calling
g_ptr_array_set_size(group->key_items, 0);
it calls free_key_binding() for every item - when these items are
deallocated by g_free(group->plugin_keys) previously, calls of
free_key_binding() reference an invalid memory.
Just first resizing group->key_items (and calling free_key_binding() for
its items) and freeing group->plugin_keys afterwards fixes the problem.