Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/filters-search.js

Issue 29357368: Issue 4525 - Filter Preferences: Move findbar to the top of the filters list (Closed) Base URL: https://hg.adblockplus.org/adblockplus
Patch Set: Created Oct. 14, 2016, 8:09 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/content/ui/filters-search.js
===================================================================
--- a/chrome/content/ui/filters-search.js
+++ b/chrome/content/ui/filters-search.js
@@ -89,32 +89,31 @@ var FilterSearch =
return "";
let caseSensitive = E("findbar-case-sensitive").checked;
if (typeof direction == "undefined")
direction = (text == this.lastSearchString ? 1 : 0);
this.lastSearchString = text;
- function normalizeString(string)
- {
- return caseSensitive ? string : string.toLowerCase();
- }
+ let normalizeString = (caseSensitive ?
+ string => string :
+ string => string.toLowerCase());
Wladimir Palant 2016/10/14 08:12:12 Unrelated change but I realized that this can be f
function findText(startIndex)
{
let list = E("filtersTree");
let col = list.columns.getNamedColumn("col-filter");
let count = list.view.rowCount;
for (let i = startIndex + direction; i >= 0 && i < count; i += (direction || 1))
{
let filter = normalizeString(list.view.getCellText(i, col));
if (filter.indexOf(text) >= 0)
{
- FilterView.selectRow(i);
+ FilterView.selectRow(i, true);
return true;
}
}
return false;
}
text = normalizeString(text);

Powered by Google App Engine
This is Rietveld