Last Comment Bug 780631 - Don't change the selected script while filtering if the file part from the search expression hasn't changed
: Don't change the selected script while filtering if the file part from the se...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Debugger (show other bugs)
: 12 Branch
: All All
: P3 normal (vote)
: Firefox 17
Assigned To: Victor Porof [:vporof][:vp]
:
Mentors:
Depends on:
Blocks: 774788
  Show dependency treegraph
 
Reported: 2012-08-06 08:19 PDT by Victor Porof [:vporof][:vp]
Modified: 2012-08-09 11:50 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (5.73 KB, patch)
2012-08-08 09:46 PDT, Victor Porof [:vporof][:vp]
rcampbell: review+
Details | Diff | Splinter Review

Description Victor Porof [:vporof][:vp] 2012-08-06 08:19:53 PDT
If there are two very similarly named files, for example:

foo/bar/baz.js
baz.js

...then when trying a filter like baz.js#token, for each letter entered in the #token, the selected script switches to `foo/bar/todos.js` if the previously selected script was `todos.js`.

Thus, the script always switches to the first found mach. This annoyed me today.
Comment 1 Victor Porof [:vporof][:vp] 2012-08-06 08:20:44 PDT
s/todos/baz :)
Comment 2 Victor Porof [:vporof][:vp] 2012-08-08 09:46:08 PDT
Created attachment 650180 [details] [diff] [review]
v1
Comment 3 Rob Campbell [:rc] (:robcee) 2012-08-08 13:19:57 PDT
Comment on attachment 650180 [details] [diff] [review]
v1

-    if (token.length) {
+    if (this._prevSearchedToken !== token && token.length > 0) {

could just use && token.length but OK for highlighting you have a number there.
Comment 4 Victor Porof [:vporof][:vp] 2012-08-08 13:36:59 PDT
(In reply to Rob Campbell [:rc] (:robcee) from comment #3)
> Comment on attachment 650180 [details] [diff] [review]
> v1
> 
> -    if (token.length) {
> +    if (this._prevSearchedToken !== token && token.length > 0) {
> 
> could just use && token.length but OK for highlighting you have a number
> there.

Yeah, that's exactly what I was going for. I bit myself with this here at some point sometime.
Comment 5 Victor Porof [:vporof][:vp] 2012-08-08 14:48:15 PDT
https://hg.mozilla.org/integration/fx-team/rev/0349be34cdc1
Comment 6 Tim Taubert [:ttaubert] 2012-08-09 11:50:41 PDT
https://hg.mozilla.org/mozilla-central/rev/0349be34cdc1

Note You need to log in before you can comment on or make changes to this bug.