diff --git a/zathura.c b/zathura.c index 7adcf0c..370c589 100644 --- a/zathura.c +++ b/zathura.c @@ -1869,6 +1869,10 @@ search(void* parameter) if(argument->n != NO_SEARCH) { + /* search document */ + if(argument->n) + direction = (argument->n == BACKWARD) ? -1 : 1; + if(argument->data) { if(search_item) @@ -1898,10 +1902,6 @@ search(void* parameter) Zathura.Search.results = NULL; } - /* search document */ - if(argument->n) - direction = (argument->n == BACKWARD) ? -1 : 1; - Zathura.Search.query = g_strdup(search_item); int number_of_pages = Zathura.PDF.number_of_pages;