[geany/geany] d7ed48: Fix a problem in tm_tags_remove_file_tags() when more tags of the same name exist

Jiří Techet git-noreply at xxxxx
Fri Oct 31 01:03:13 UTC 2014


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Fri, 31 Oct 2014 01:03:13 UTC
Commit:      d7ed48f86be3957afb155edcb5a9c16afdc4054f
             https://github.com/geany/geany/commit/d7ed48f86be3957afb155edcb5a9c16afdc4054f

Log Message:
-----------
Fix a problem in tm_tags_remove_file_tags() when more tags of the same name exist


Modified Paths:
--------------
    tagmanager/src/tm_tag.c

Modified: tagmanager/src/tm_tag.c
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -831,7 +831,9 @@ void tm_tags_remove_file_tags(TMSourceFile *source_file, GPtrArray *tags_array)
 			{
 				/* we cannot set the pointer to NULL now because the search wouldn't work */
 				g_ptr_array_add(to_delete, found);
-				break;
+				/* no break - if there are multiple tags of the same name, we would 
+				 * always find the first instance and wouldn't remove others; duplicates
+				 * in the to_delete list aren't a problem */
 			}
 			found++;
 		}



--------------
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