@lvce-editor/text-search-worker 5.9.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3991,11 +3991,14 @@ const getDisplayResult = (results, fileIcons, i, setSize, searchTermLength, repl
|
|
|
3991
3991
|
};
|
|
3992
3992
|
|
|
3993
3993
|
const getDisplayResults = (results, itemHeight, resultCount, searchTerm, minLineY, maxLineY, replacement, fileIcons, focusedIndex, collapsedPaths, originalResults) => {
|
|
3994
|
+
// Filter out child items when parent files are collapsed
|
|
3995
|
+
const filteredResults = getFilteredResults(results, collapsedPaths);
|
|
3994
3996
|
const displayResults = [];
|
|
3995
3997
|
const setSize = resultCount;
|
|
3996
3998
|
const searchTermLength = searchTerm.length;
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
+
const max = Math.min(filteredResults.length, maxLineY);
|
|
4000
|
+
for (let i = minLineY; i < max; i++) {
|
|
4001
|
+
const displayResult = getDisplayResult(filteredResults, fileIcons, i, setSize, searchTermLength, replacement, focusedIndex, collapsedPaths, minLineY, originalResults);
|
|
3999
4002
|
displayResults.push(displayResult);
|
|
4000
4003
|
}
|
|
4001
4004
|
return displayResults;
|