[geany/geany] 20e368: Try harder when definition/declaration was not found

Jiří Techet git-noreply at xxxxx
Thu Jun 9 08:01:59 UTC 2016


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Thu, 09 Jun 2016 08:01:59 UTC
Commit:      20e368155812e611f2ec991273b05fae914f1c45
             https://github.com/geany/geany/commit/20e368155812e611f2ec991273b05fae914f1c45

Log Message:
-----------
Try harder when definition/declaration was not found

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.


Modified Paths:
--------------
    src/symbols.c

Modified: src/symbols.c
5 lines changed, 2 insertions(+), 3 deletions(-)
===================================================================
@@ -2133,10 +2133,9 @@ static gboolean goto_tag(const gchar *name, gboolean definition)
 		definition = current_tag->type & forward_types;
 
 	filtered_tags = filter_tags(tags, current_tag, definition);
-	if (current_tag && filtered_tags->len == 0)
+	if (filtered_tags->len == 0)
 	{
-		/* if we previously swapped definition/declaration search and didn't
-		 * find anything, try again with the opposite type */
+		/* if we didn't find anything, try again with the opposite type */
 		g_ptr_array_free(filtered_tags, TRUE);
 		filtered_tags = filter_tags(tags, current_tag, !definition);
 	}



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list