Fixed recursive matching arguments

This commit is contained in:
n1474335 2021-02-05 19:04:27 +00:00
parent 47bbefd81f
commit ba66fd6546
2 changed files with 12 additions and 12 deletions

View file

@ -6,7 +6,7 @@
import HTMLOperation from "../HTMLOperation.mjs";
import Sortable from "sortablejs";
import {fuzzyMatch} from "../../core/lib/FuzzySearch.mjs";
import {fuzzyMatch, calcMatchRanges} from "../../core/lib/FuzzySearch.mjs";
/**
@ -123,7 +123,7 @@ class OperationsWaiter {
if (nameMatch || descPos >= 0) {
const operation = new HTMLOperation(opName, this.app.operations[opName], this.app, this.manager);
if (highlight) {
operation.highlightSearchStrings(idxs || [], [[descPos, searchStr.length]]);
operation.highlightSearchStrings(calcMatchRanges(idxs) || [], [[descPos, searchStr.length]]);
}
if (nameMatch) {