* implement the :erase message from the backend to properly clean up the
header buffer When we're doing a search while the results of a previous search are still coming in from the backend, this way we can tell the frontend that this is the right time to clear the buffer (previously, sometimes the results would be mixed).
This commit is contained in:
@ -376,6 +376,12 @@ cmd_find (MuStore *store, MuQuery *query, GSList *args, GError **err)
|
||||
return server_error (err, MU_ERROR_INTERNAL,
|
||||
"couldn't get iterator");
|
||||
|
||||
/* before sending new results, send an 'erase' message, so the
|
||||
* frontend knows it should erase the headers buffer. this
|
||||
* will ensure that the output of two finds quickly will not
|
||||
* be mixed. */
|
||||
send_expr ("(:erase t)");
|
||||
|
||||
/* return results + the number of results found */
|
||||
send_expr ("(:found %u)\n", output_found_sexps (iter, maxnum));
|
||||
mu_msg_iter_destroy (iter);
|
||||
|
||||
Reference in New Issue
Block a user