[anjuta] sourceview: Don't loop if the found provider is cancelled



commit 59f8baecb7880d7a401f743eb24b4152e13d9cce
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Aug 3 18:10:09 2010 +0200

    sourceview: Don't loop if the found provider is cancelled

 plugins/sourceview/sourceview.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index 9aef80d..ef771f9 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -2182,11 +2182,13 @@ iassist_proposals(IAnjutaEditorAssist* iassist,
 		SourceviewProvider* prov;
 		if (!SOURCEVIEW_IS_PROVIDER (node->data))
 			continue;
+		
 		prov = SOURCEVIEW_PROVIDER(node->data);
-		if (prov->cancelled)
-			continue;
 		if (prov->iprov == provider)
 		{
+			if (prov->cancelled)
+				break;
+
 			GList* prop;
 			GList* items = NULL;
 			for (prop = proposals; prop != NULL; prop = g_list_next(prop))
@@ -2212,6 +2214,7 @@ iassist_proposals(IAnjutaEditorAssist* iassist,
 			}
 			gtk_source_completion_context_add_proposals (prov->context, GTK_SOURCE_COMPLETION_PROVIDER(prov),
 			                                             items, finished);
+			break;
 		}
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]