This commit is contained in:
parent
045cf17dee
commit
10d6d7521a
|
@ -107,6 +107,7 @@ function showSearchResults(searchTool, query, input, value, resultType) {
|
|||
|
||||
function showSearchResultsExtended(element, template, searchTool, query, input, value, resultType, options) {
|
||||
const $lc = $(element)
|
||||
// FIXME(peter): we should not reload this every time we search
|
||||
return searchTool(query).then(results => {
|
||||
let opt = options || {};
|
||||
if (opt.showOnlyResults && (query.length === 0 || !results.length)) {
|
||||
|
|
|
@ -140,6 +140,7 @@ function editor(root, inputData, options) {
|
|||
function getChildren(id) {
|
||||
return store.children(id)
|
||||
}
|
||||
|
||||
function replaceChildren(id, children) {
|
||||
store.replaceChildren(id, children)
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ function Store(inputData) {
|
|||
let fromIndex = index(from)
|
||||
let toIndex = to && to !== 'at-end' ? index(to) : idList.length
|
||||
let n = lastHigherIndented(fromIndex) - fromIndex
|
||||
if (toIndex >= fromIndex && toIndex < fromIndex + n) return index(from)
|
||||
if (toIndex >= fromIndex && toIndex < fromIndex + n) return [index(from), n]
|
||||
if (fromIndex < toIndex) {
|
||||
rotate(idList, fromIndex, toIndex, n)
|
||||
changed = true
|
||||
|
|
Loading…
Reference in New Issue
Block a user