Add filetype_get_comment_open_close() to get appropriate start and end
comment markers from a filetype, and use it everywhere these markers
are fetched.
This fixes a crash in editor_insert_multiline_comment() if only single
comments are available (closes#3449635).
Although this doesn't change anything in practice, it started to be a
nightmare trying to deal with compilers warnings about "missing"
initializers, which are generally good but not in that file.
When checking whether a keybinding is already in use before updating
it in the preferences, check against the keybindings the user may have
updated, not the ones that are currently applied.
This fixes changing action A from key K to key L and action B from key
L to key K, which led to conflicts back and forth since when setting B
to K the check found A as a duplicate even after having changed it.
Use a GCC pragma to disable -Wmissing-field-initializers in this file.
This works with both GCC and CLang, and should be harmless on other
compilers since unknown pragmas are supposed to be ignored.
Old implementation was not really fitting the updating needs and had a
bug making symbols disappear if they haven't changed but their parent
did (e.g. when a C++ constructor's signature changed).
New implementation does:
1) walk old tree, updating or removing rows;
2) add remaining tags.
It walks less than (new_tags + old_tags + new_tags) in the worst case,
thanks to some hash table-based caching; and also gets rid of the
"valid" column in the symbols tree, saving a few bytes in memory.
Finally, there is a ~7% performance gain (from 21 to 18ms) upon common
tree updates, sometimes more.
Instead we should use that tab which is under mouse cursor where the user clicked (this might be a
different one than the current document). To be able to do so, we need to handle the right-click signal
per tab not on the GtkNotebook tab area to identify the tab under the mouse cursor.
While this is a violation of the C standard in theory, it should not affect anything.
Anyway, removing the double underscores makes the header guard scheme more
consistent with the rest of Geany header files so it's still a good thing.
This does not affect existing users.
Ctrl-T Go to tag definition
Ctrl-Shift-T Go to tag declaration
A default keybinding for 'Transpose current line' is no longer
necessary as it does the same as 'Move line(s) up', which we now have
a default for.
This does not affect existing users.
Ctrl-Shift-PageUp Move document left
Ctrl-Shift-PageDown Move document right
The above shortcuts were aliases for selecting left/rightmost
documents, but those are not necessary as Alt-1/Alt-0 does the same.
Alt-PageUp Move line(s) up
Alt-PageDown Move line(s) down
Alt is easier to press than Ctrl-Shift, so is better for moving lines
as this needs more accuracy.
This adds a new commandline option --read-only (or -r). It's implemented
according to the behavior agreed on on the mailing list:
--read-only applies to all files on the command line
irrespective of positioning and has no effect on any other files
opened by session or menu (...)
Current behaviour on attempting to re-open a file with different
read-only status is that nothing happens, the already open
file is raised but not changed. (...)
This adds an hidden VTE preference, send_cmd_prefix, that allows to
define a prefix for the commands Geany sends to the shell in the VTE
like "cd" when following current path.
This can be used for example to prevent some shells (Bash, ZSH, maybe
others) from putting these commands in the history by setting this to
a space.
Note: This doesn't affect existing user shortcuts.
Ctrl-Shift-D Find Document Usage
Ctrl-Shift-E Find [Session] Usage (one letter after doc usage and
close on the keyboard)
These are standard shortcuts for browsers:
Alt-Right Forward
Alt-Left Back
This matches the build/make symmetry for compile (F8):
Shift-F8 Make Object
E.g.
highlighting.c:950:3: error: the address of
'highlighting_styles_ADA' will always evaluate as 'true'
Note: This commit also contains some trailing whitespace removal.
Works around the issue discussed in commit 1e54fb6 by using the file
chooser's property accessor function.
Rename on_file_notify() to better explain its purpose.
In the dialog, the plugin's description is more interesting and useful than the full filename.
Instead, show the filename in the bottom box for those interested in.