calltips: Allow for C++-style explicit specialization after the name

Closes #496.

Based on PR#496 by @DThought, thanks.
This commit is contained in:
Colomban Wendling 2016-02-17 18:49:32 +01:00
parent 989e0df412
commit 444a18b5e1

View File

@ -2026,6 +2026,17 @@ gboolean editor_show_calltip(GeanyEditor *editor, gint pos)
while (pos > 0 && isspace(sci_get_char_at(sci, pos - 1)))
pos--;
/* skip possible generic/template specification, like foo<int>() */
if (sci_get_char_at(sci, pos - 1) == '>')
{
pos = sci_find_matching_brace(sci, pos - 1);
if (pos == -1)
return FALSE;
while (pos > 0 && isspace(sci_get_char_at(sci, pos - 1)))
pos--;
}
word[0] = '\0';
editor_find_current_word(editor, pos - 1, word, sizeof word, NULL);
if (word[0] == '\0')