| Index: Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
|
| diff --git a/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js b/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
|
| index 30e0333e0c791f9830d4e786c4d29cdb7ecceb56..4d8861182a57d469986b375ae70e4704759328c9 100644
|
| --- a/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
|
| +++ b/Source/devtools/front_end/sources/FilteredItemSelectionDialog.js
|
| @@ -467,16 +467,16 @@ WebInspector.SelectionDialogContentProvider.prototype = {
|
| */
|
| function rangesForMatch(text, query)
|
| {
|
| - var sm = new difflib.SequenceMatcher(query, text);
|
| - var opcodes = sm.get_opcodes();
|
| + var opcodes = WebInspector.Diff.charDiff(query, text);
|
| + var offset = 0;
|
| var ranges = [];
|
| -
|
| for (var i = 0; i < opcodes.length; ++i) {
|
| var opcode = opcodes[i];
|
| - if (opcode[0] === "equal")
|
| - ranges.push(new WebInspector.SourceRange(opcode[3], opcode[4] - opcode[3]));
|
| - else if (opcode[0] !== "insert")
|
| + if (opcode[0] === WebInspector.Diff.Operation.Equal)
|
| + ranges.push(new WebInspector.SourceRange(offset, opcode[1].length));
|
| + else if (opcode[0] !== WebInspector.Diff.Operation.Insert)
|
| return null;
|
| + offset += opcode[1].length;
|
| }
|
| return ranges;
|
| }
|
|
|