Even when we know when should be searching for definition (or declaration),
we can keep searching for the opposite type too when we didn't find
anything with the "correct" def/decl type. So at least we find "something"
of that name.
To detect the change of typename list since the last time the colourisation
happened, we could store the complete typename string used during the
last colourization and compare it with the current string. For lots of
typenames this might be quite a huge string stored for every opened tab
(well, it's also stored in Scintilla already for every document but better
not to have it twice). Instead, we can store an uint hash of the string.
We could also use a better hash function with longer hash value but
uint size should be enough for this case (and in the case of a collision
nothing terrible happens).
Properly handle discarding the dialog asking whether to override a
keybinding as canceling it rather than as allowing multiple identical
keybindings.
In the way, simplify and fix dialogs_show_prompt() not to perform odd
and useless response mapping that effectively go round back, and that
don't handle what the comment above it suggests. Simply document it
can return GTK_RESPONSE_DELETE_EVENT and handle it in the caller side,
as it's a possibly valuable information. Only one current caller is
affected, and it doesn't change anything as it doesn't change behavior
but only documents it.
Closes#714.
Make each convenience library depend on the ones it requires, which is
pretty straightforward for us as they each only depend on a single
other one, avoiding any worry about double linking of static objects.
GTK 3.20 doesn't like getting a style property for a non-current state,
unless the call is wrapped in a save()/restore() pair.
So, fix the code to either use the current state or temporarily save
the context.
gb.c now uses different states, but it shouldn't really matter given
how they are used, and even gives a native behavior when the window
loses focus, as it now properly reacts to BACKDROP state.
Normally menu items are updated only when adding or removing
them on osx. They are however not redrawn when just changing
keybindings so the old keybinding is displayed after the change.
Force the menu update to show the updated keybindings.
The Doxygen comments were on the non-public global filetypes_array and
filetypes_by_title variables instead of the GeanyData members which are
exposed to the plugin API and reference manual.
The global was never accessible to plugins on Windows and hasn't been
accessible to plugins on Linux and others since the linkage-cleanup
changes.
Move documentation from the global variable to the GeanyData member
of the same name.
Closes#964
* always filter-out symbol from the current line from the list
* when clicked on a symbol on the current line always swap
definition/declaration search even if there are more symbols from the
current search direction
Fixes#950
Buffered draw seems to be faster and with newer Gtk versions
works correctly on HiDPI screens.
I haven't checked precisely since which Gtk version this works
(didn't work in 3.10, might have been fixed in a later version)
but it isn't as important because even with 3.16 the build
is highly unstable because of Gtk issues (Gtk 3.18 seems to
be promising though).
For instance when performing goto tag for Foo and Foo is defined as
typedef struct Foo {} Foo;
go immediately to the struct location without showing the goto popup with
both the struct name and typedef. When there are more occurrences of the
name, filter the list and don't show the synonyms in the popup.
In addition, if the cursor is on the same line as the typedef, go to
the struct and vice versa.
Note the missing
g_strcmp0(second->var_type, first->name) == 0
in the check - in this particular case we won't get the type to which the
typedef refers inside var_type because at the time the typedef tag is
generated in c.c the struct tag doesn't exist yet. On the other hand
there's no second->var_type == NULL either because this behaviour seems
to be rather implementation-specific and might easily change in the
future. The existing checks are probably sufficient for the real-world
code.