[Geany-devel] search in session/document patch

Enrico Tröger enrico.troeger at xxxxx
Sun Mar 15 07:54:44 UTC 2009


On Sat, 14 Mar 2009 06:30:57 +0100, Thomas wrote:

>Bert Vermeulen schrieb:
>> Thomas Martitz wrote:
>>   
>>> Bert Vermeulen schrieb:
>>>     
>>>> When you search with ctrl+f and use either the "In Session" or "In
>>>> Document" buttons to report the results in the messages window,
>>>> multiple matches on the same line in a document are reported
>>>> multiple times -- the same line is thus reported however many
>>>> times there was a match in it.
>>>>
>>>> The attached patch fixes this.
>>>>       
>>> And how is this a bug?
>>>     
>>
>> This is me searching for "td" in an HTML document:
>>
>> index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
>> index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
>> index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
>> index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
>> index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
>> index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
>> Found 6 matches for "td".
>>
>> It just shows the same line six times, which serves no purpose and
>> clutters up the message window for no reason -- you just have to
>> scroll through more messages to find relevant search results.
>>
>> This is the same search with my patch:
>>
>> index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
>> Found 1 match for "td".
>>
>> It's not a bug, it's a user interface deficiency, and this is an
>> obvious fix.
>>
>>
>>   
>
>Ah well, I got it slightly wrong then. But I still think it should say
>6 matches, but only show the line once (if there's more than 1
>matches). Showing 1 match in this example is simply wrong. I agree
>though, that showing the same line 6 times is bad too.

That should work. Don't confuse this with "Find in Session", then the
amount matches mean the amount of files with matches, IIRC.
I tested it with Find in Document and there the amount of matches was
correct.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090315/8b4174cc/attachment.pgp>


More information about the Devel mailing list