Don't simply split the the extra options string on spaces to build the
grep argument list but rather split it in a shell-style fashion.
This is probably more intuitive for most users, is more consistent with
e.g. custom commands, and allows for spaces in an option or its
argument.
Closes#3516263.
This doesn't change anything in practice since GTK brings GLib and
GModule is linked with the Geany program, but it's cleaner for the lib
to list its true dependencies.
GIO used to bring GModule, but it became a private dependency since
GIO 2.31. So, add explicit checks for GModule so we still build with
GLib/GIO >= 2.31.
Closes#3483388.
Rename use of C++ `template` keyword in plugin API function argument
and add `G_BEGIN_DECLS` and `G_END_DECLS` to public header files to
make them easier to include in C++ code. TagManager and Scintilla
headers already have these `extern "C"` blocks so they shouldn't
require any modifications.
The Autotools build system already adds in a `dummy.cxx` to hint
Automake into C++ linking to support Scintilla, which is quite
convenient for dynamically loading of C++ plugins at run-time into
the otherwise C-only program. The other build systems seem to also
use the correct linking.
Write an empty keybindings.conf for new users to prevent the workaround
for old defaults being written.
Also remove generated comment in keybindings.conf, this file doesn't
need an explanation as it is generated by Geany.
This provides a workaround so existing users who upgrade should now
be unaffected.
The default changed for these in commits
82769a046c6394d073cc8a32677d8d4794c12c4c and
9ae71ab6cc3bb8185939e1536ffba41beb896686, but this may be
confusing/annoying for existing users who have not edited any
keybindings.
Those commit messages were wrong about never affecting existing
users. Thanks to Lex for raising this.
Previously it was useful because `reflow_lines`, in case when selection
contained trailing newline, removed that newline from selection by
calling `sci_set_selection_end` which only works when anchor > current
cursor position (it's mentioned in Scintilla's documentation on
SCI_SETSELECTIONEND).
Now trailing newline is removed by calling `sci_deselect_last_newline`
which uses `sci_set_selection` with `start` and `end` arguments. This
function works regardless of the interposition of current cursor
position and anchor.
The code joined current line with the next one when no text is selected.
For "Join lines" command this behaviour is wrong; for "Reflow paragraph"
the case is already handled outside the `reflow_lines` function.