[Geany-devel] search in session/document patch

Thomas Martitz thomas.martitz at xxxxx
Sat Mar 14 05:30:57 UTC 2009


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.

So, it seems to be committed now, but I had preferred:

index.html:32 : <td>cell 1</td><td>cell 2</td><td>cell 2</td>
Found 6 matches for "td".


Best regards, kugel



More information about the Devel mailing list