grepWin icon indicating copy to clipboard operation
grepWin copied to clipboard

Can there be a back button for going to the previously searched text

Open abhijitnandy2011 opened this issue 3 years ago • 12 comments

Thanks for the great tool. I use it every day! I have to often follow up function calls in code and then I have to look up a sequence of words one by one. Say I first search for "fileRead" in a directory and that may produce some 5 results. Then I might find that one of them contains the function call "startServer", so I ll then search for that word. Now the results for the second search completely replace the results for the first one. If I now need to go back to the results of "fileRead", I need to search with it again which is a bit of a bummer. This pattern is especially required when debugging issues. So basically each search produces multiple results but it overwrites the results of the previous search. I am thinking a simple back button to go back to the previous search results would be so useful! Which also means there should be a forward button. I am going to add it myself to the grepWin code, just was looking for pointers as to where the UI controls are added exactly. Also if such a feature already exists or has been ever considered?

abhijitnandy2011 avatar Oct 09 '21 09:10 abhijitnandy2011

just empty the search field (or any other text fields), then hit the cursor-down key and you'll get a list of the last 20 previous searches.

stefankueng avatar Oct 12 '21 16:10 stefankueng

Can this history show/work w/o deleting the text as well?

BTW, is there an d ETA for 2.0.9?

rafi-d avatar Nov 13 '21 13:11 rafi-d

what do you mean with "w/o deleting the text"? if you get the list, use the cursor keys to get to the one you want and hit tab or enter, or just click on it and it will get inserted in the edit field.

stefankueng avatar Nov 13 '21 13:11 stefankueng

what do you mean with "w/o deleting the text"?

Usually, there is already a search text in the "Search for:" field. It would be nice if the history can be viewed (using the down arrow key) without the need to delete the existing text first, when the new selected text will just replace what's in the field already.

rafi-d avatar Nov 13 '21 13:11 rafi-d

well, the dropdown filters the entries to what's already written in the box. That's why you have to remove the text first if you want something that doesn't match.

stefankueng avatar Nov 13 '21 13:11 stefankueng

well, most/some of the times, you do NOT want any filters (at least for me)... Maybe use shift-down-arrow to see the list with filter and down-arrow without it (or something similar)?

rafi-d avatar Nov 13 '21 13:11 rafi-d

a double click on the edit field also drops down the list, but with no filter.

stefankueng avatar Nov 13 '21 14:11 stefankueng

Ok, good to know that secret... :)

rafi-d avatar Nov 13 '21 14:11 rafi-d

It seems to me that now "the history can be viewed (using the down arrow key) without the need to delete the existing text first".

agiudiceandrea avatar Oct 06 '22 01:10 agiudiceandrea

I think the problem is that the history list is sorted alphabetically, and NOT sorted by the order entered. I suggest to sort it by last entered first (descending)

PS: Also - control-z will revert to he previous search string, but this is true only for the current session...

rafi-d avatar Oct 06 '22 05:10 rafi-d

if you have text in the box, the history combo only shows text that matches the entered one

stefankueng avatar Oct 06 '22 14:10 stefankueng

I was referring to double click on an empty box.

rafi-d avatar Oct 06 '22 14:10 rafi-d