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

[Feature request] Reexecute a search when a file has been modified #9633

Open
AFract opened this issue Mar 10, 2021 · 2 comments
Open

[Feature request] Reexecute a search when a file has been modified #9633

AFract opened this issue Mar 10, 2021 · 2 comments

Comments

@AFract
Copy link

AFract commented Mar 10, 2021

Hello, I am a happy user of NPP, enjoying it and its plugins everyday :).

I have a feature request :
I oftenly use the feature "Find all in current document", which will list all search results in bottom pane.
However, if my document is modified externally (which may happen very frequently when you are reading some application logs), if I want to see the new results matching with my search after to have reloaded the file, I have to do the search again.

Instead it would be very nice to be able to directly refresh search results, for example by a right click in the bottom window on the search results, and having a "reexecute search" option to click.

Thank you

@sasumner
Copy link
Contributor

This is a nice idea, although it has some potential hurdles to overcome:

There are more types of searches that write to the Search results window than a Find All in Current Document search. But...even just considering a FACD search, does such a thing run on the potentially-new current document, or the document that was current when the original search was run?

And there's a way to search only in the active selection in the current document. So should this thing remember that and only run upon the currently active selection in the current document, or does it remember the range of the original selection and run only upon that? What if that area of text no longer exists?

And we can extend the above "hurdles" list when considering Find in Files as well...

Perhaps an alternative to consider would be resetting the Find / Find in Files window data fields to their settings in effect when a search was originally run. Then you're just one button press away from re-executing your search, but you get a chance to confirm what you're about to do and the ability to tweak it slightly.

@AFract
Copy link
Author

AFract commented Mar 11, 2021

Maybe you could make the option available only for a limited range of cases, and enable it only for the FACD, and when the search was covering the whole document and not only selected text ?
I think my use case (searching specific items in a log file that can keep frequently updated) can interest a lot of people.
Thank you for your answer :)

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

2 participants