Commit b3072957 authored by Gabriela Bittencourt's avatar Gabriela Bittencourt
Browse files

Fix redundance:

it's not necessary rebuild the completion_index from the search.index,
we can consider that if search.index exists, this information will also
be at completion.json
parent 3f4879aa
Pipeline #3707 failed with stage
in 0 seconds
......@@ -845,9 +845,9 @@ var canvas_events = (function() {
// GB: every 50 changes in completion_index, make sure to save the alterations on json file
// in case of unexpected quit or crash of purr data, it will be lost only few changes
if (++changes_in_completion_index > 50) {
if (changes_in_completion_index===0 || ++changes_in_completion_index > 50) {
pdgui.write_completion_index();
changes_in_completion_index = 0;
changes_in_completion_index = 1;
}
}
}
......
......@@ -462,13 +462,6 @@ function make_index() {
"related_objects": rel_obj,
"ref_related_objects": ref_rel_obj
});
if (obj_exact_match(title).length===0) {
completion_index.add({
"occurrences" : 0,
"title" : title,
"args" : []
});
}
}
}
finish_index();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment