focus-editor / focus

A simple and fast text editor
GNU General Public License v3.0
1.81k stars 99 forks source link

Feature Request: Display number of search results found when using "Search In Workspace" #429

Closed LongBoolean closed 4 weeks ago

LongBoolean commented 2 months ago

I was trying to think of a quick way to get a count on the instances of @TODO, @HACK, @copypasta, etc., that currently exist in a project. Using Focus to search in a workspace is almost there.

In the meantime I am just printing out total_results inside finder_update::() in finder.jai I am aware that total_results maxes out at 1000, and I am not suggesting raising the limit or performing an exhaustive search if such a thing is prohibitively expensive. It would be fine if the search displayed ">1000" in such cases. (Under 1000 would likely be 80% of the uses cases anyway.)

focus-editor commented 2 months ago

That's on the list. It's 1000 per worker by the way, so the real limit is likely upwards of 3000

LongBoolean commented 2 months ago

Oh ok, you wouldn't happen to remember what variable is the sum of all the workers? (right now I'm using results.count in draw.jai, is that the right one?) Also do you know where I can find the number of workers?

I've done a little more tinkering and I have something a little bit nicer than just printing. Screenshot from 2024-09-23 17-33-42

focus-editor commented 2 months ago

Yes that's the right one. We'll probably add a counter in the next release, it's been on the list for a while.

focus-editor commented 4 weeks ago

This is now in the next nightly