Commit 3aa2771e authored by Moritz Lipp's avatar Moritz Lipp

Update

parent 2916af3f
......@@ -53,10 +53,11 @@ compare_rectangle(zathura_rectangle_t* rect1, zathura_rectangle_t* rect2)
}
START_TEST(test_pdf_page_search_text_default) {
zathura_list_t* results;
zathura_list_t* results = NULL;
/* no results */
fail_unless(pdf_page_search_text(page, "efg", ZATHURA_SEARCH_WHOLE_WORDS_ONLY, &results) == ZATHURA_ERROR_SEARCH_NO_RESULTS);
fail_unless(results == NULL);
fail_unless(pdf_page_search_text(page, "abc", ZATHURA_SEARCH_DEFAULT, &results) == ZATHURA_ERROR_OK);
fail_unless(results != NULL);
......
......@@ -51,7 +51,7 @@ zathura_error_t pdf_page_search_text(zathura_page_t* page, const char* text,
goto error_out;
}
for (int i = 0; i < num_results; i++) {
for (int i = 0; i < num_results/2; i++) { // TODO: Understand the div 2
zathura_rectangle_t* rectangle = calloc(1, sizeof(zathura_rectangle_t));
if (rectangle == NULL) {
error = ZATHURA_ERROR_OUT_OF_MEMORY;
......
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