Comment 9 for bug 2065501

Revision history for this message
Brian Ejike (bejike) wrote :

> "and hence rendering jobs will be enqueued behind that"

Ah, I see. Is there no (easy) way that "Find Next/Prev" could realize the next result's page hasn't been rendered yet, and so wait until that happens before visiting that page?

> "I guess qpdfview is currently unable to disambiguate between "Enter" to begin a new search and "Enter" as "Find Next""

Also, what do you think of this other issue? Is there a way to set Enter as Find Next shortcut, and still have it initiate a new search immediately when pressed?

In fact, it seems the code is inclined to do this already, without needing any change in shortcuts (introduced in 2017: https://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/revision/2034):

```
void MainWindow::on_searchInitiated(const QString& text, bool modified)
...
        if(tab->searchText() != text || tab->searchMatchCase() != matchCase || tab->searchWholeWords() != wholeWords || tab->searchWasCanceled())
        {
            tab->startSearch(text, matchCase, wholeWords);
        }
        else
        {
            tab->findNext();
        }
```

Yet, when I test with pressing Enter a bunch of times after the search is finished, it does nothing. If I click inside the text box again and press Enter (without changing the text), it starts a new search for the same old text.

(Do you have the same behaviour, or is my version somehow too old and missing some fix?)