b4n commented on this pull request.


> @@ -2297,3 +2337,59 @@ void search_find_again(gboolean change_direction)
                                
toolbar_get_widget_child_by_name("SearchEntry"), (result > -1));
        }
 }
+
+
+static void load_combo_box_history(GtkWidget *combo_entry, gchar 
**recent_terms)
+{
+       guint i, len = 0;
+
+       if (recent_terms != NULL)
+       {
+               len = g_strv_length(recent_terms);

Implementation note: `g_strv_lenght()` is fairly costly (not that it actually 
really matters here, but well), and not really necessary here.  You could 
simply do:

```C
for (; recent_terms != NULL && *recent_terms != NULL; recent_terms++)
{
        ui_combo_box_add_to_history(GTK_COMBO_BOX_TEXT(combo_entry), 
*recent_terms, 0);
}

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1745#pullrequestreview-91309141

Reply via email to