public List<SourceCompletionItem>? fetchMatches(SourceCompletionContext context, out bool has_matches)
{
- var has_matches = false;
+ has_matches = false;
if (this.windowstate == null) {
this.windowstate = this.editor.window.windowstate;
public void populate (SourceCompletionContext context)
{
- this.fetchMatches(context, out has_matches);
+ bool has_matches = false;
+ var filtered_proposals = this.fetchMatches(context, out has_matches);
if (!has_matches) {
- return;
+ context.add_proposals (this, null, true);
+ return;
}
-
+ // add proposals triggers a critical error in Gtk - try running gtksourceview/tests/test-completion.
+ // see https://bugzilla.gnome.org/show_bug.cgi?id=758646
+ var fe = GLib.Log.set_always_fatal(0);
context.add_proposals (this, filtered_proposals, true);
+ GLib.Log.set_always_fatal(fe);
}
}
+