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.
On Fri, 13 Mar 2009 12:58:00 +0100, Bert wrote:
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.
Thanks a lot, committed.
Regards, Enrico
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.
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
And how is this a bug?
Best regards, kugel
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.
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
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
Enrico Tröger schrieb:
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
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
His exampe was:
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".
I just said, that it should say "Found 6 matches for "td"", but still show the line only once. I'm not sure how this is related to "Search in Session", I think his example was about searching in one HTML document. If it was about search in session, then it should only show the number of files which contain matches I guess.
Best regards, kugel.
On Sun, 15 Mar 2009 13:30:02 +0100, Thomas wrote:
Enrico Tröger schrieb:
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
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
His exampe was:
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".
I just said, that it should say "Found 6 matches for "td"", but still show the line only once. I'm not sure how this is related to "Search in Session", I think his example was about searching in one HTML document. If it was about search in session, then it should only show the number of files which contain matches I guess.
Uh. It was just too early yesterday and I didn't had yet breakfast at the time I wrote the mail :). Sorry.
First, when committing bert's patch, I broke it by moving the initialisation of "prev_line". So, his code didn't worked because I more or less disabled it by this accident :). Anyway, now it should work properly.
Regarding the initial problem of the search result message: Thomas, you were completely right. It should but didn't display "6 matches" in the above example. Should be fixed in SVN, also for Find All in Session.
Thanks you both for the code and feedback and your patience with me and my mistakes :).
Regards, Enrico