Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abhijitnandy2011 opened this issue Oct 9, 2021 · 12 comments

Comments

@abhijitnandy2011
Copy link

abhijitnandy2011 commented Oct 9, 2021

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?

@stefankueng
Copy link
Owner

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.

@rafi-d
Copy link

rafi-d commented Nov 13, 2021

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

BTW, is there an d ETA for 2.0.9?

@stefankueng
Copy link
Owner

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.

@rafi-d
Copy link

rafi-d commented Nov 13, 2021

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.

@stefankueng
Copy link
Owner

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.

@rafi-d
Copy link

rafi-d commented Nov 13, 2021

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)?

@stefankueng
Copy link
Owner

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

@rafi-d
Copy link

rafi-d commented Nov 13, 2021

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

@agiudiceandrea
Copy link
Contributor

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".

@rafi-d
Copy link

rafi-d commented Oct 6, 2022

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...

@stefankueng
Copy link
Owner

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

@rafi-d
Copy link

rafi-d commented Oct 6, 2022

I was referring to double click on an empty box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants