Search & Replace: show number of checked items

Alexander Neundorf neundorf at kde.org
Tue Apr 17 20:09:22 UTC 2018


On 2018 M04 17, Tue 08:47:51 CEST Kåre Särs wrote:
> Hi Alex,
> 
> On tisdag 17 april 2018 kl. 00:03:25 EEST Alexander Neundorf wrote:
> > Hi,
> > 
> > I have a small patch locally which makes the Search & Replace plugin show
> > the number of currently checked search results, see the attached
> > screenshot. For me this is useful with long lists of results and going
> > trhough the results one by one.
> > 
> > Objections ?
> 
> No objections :)

Will do :-)

> While you are at it, I have been thinking about adding a "Disable search as
> you type" button between the "Regexp" and "expand tree" buttons. The default

I'd prefer positive logic, i.e. an "Enable search as you type" button :-)

> would be not checked. With that option added I have also been thinking
> about adding two non-menu actions, one for "search + enable search as you
> type" and the second "search + disable search as you type". Another
> approach could be to just add an action for toggling the "disable search as
> you type" option.

Surprise, I also thought more about this topic ;-)

Two different comments:
- when using S&R, very often I search for a term which is NOT in the current 
document. In this case, search as you type is completely useless to me.

- often I want to keep the results of a search for some time and work a bit 
with them. With the search as you type as it is now, it is very easy to 
accidentially delete the results. That gives me a quite fragile feeling, I 
have to be careful. So if there was a nice and obvious way in the GUI to say 
"these results are good, I want to freeze (or stash) them" that may help. This 
is actually not too different from disabling "search as you type".
Maybe disable search as you type at the end of a "full" search ? And a way to 
enable it again ?
There is also the issue that quite often, I have the S&R tab open showing some 
useful results. Then I need to search for something else, and start typing. 
Old results are gone, because of search as you type. I should have opened a 
new tab before I started to enter the new search string. But somehow this 
feels cumbersome to me. I would prefer if I could decide to use a new tab 
after having entered the new search string.

Not sure what the conclusion is...
Maybe add a toggle action, and disable search as you type automatically after 
a full search ?

Alex



More information about the KWrite-Devel mailing list