mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 08:45:28 +03:00
CliAutocomplete set
completion update
This commit is contained in:
parent
bf9c4fece7
commit
6226e9c295
1 changed files with 1 additions and 7 deletions
|
@ -304,16 +304,12 @@ CliAutoComplete._initTextcomplete = function() {
|
||||||
search: function(term, callback) {
|
search: function(term, callback) {
|
||||||
sendOnEnter = false;
|
sendOnEnter = false;
|
||||||
searcher(term, callback, cache.settings, 3);
|
searcher(term, callback, cache.settings, 3);
|
||||||
},
|
|
||||||
replace: function (value) {
|
|
||||||
self.openLater();
|
|
||||||
return '$1' + value + ' = ';
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
strategy({ // "set with value"
|
strategy({ // "set with value"
|
||||||
match: /^(\s*set\s+(\w+)\s*=\s*)(\w*)$/i,
|
match: /^(\s*set\s+(\w+)\s*=\s*)(\w*)$/i,
|
||||||
search: function(term, callback, match) {
|
search: function(term, callback, match) {
|
||||||
var arr = [];
|
var arr = [];
|
||||||
var settingName = match[2].toLowerCase();
|
var settingName = match[2].toLowerCase();
|
||||||
this.isSettingValueArray = false;
|
this.isSettingValueArray = false;
|
||||||
|
@ -338,7 +334,6 @@ CliAutoComplete._initTextcomplete = function() {
|
||||||
|
|
||||||
callback(arr);
|
callback(arr);
|
||||||
},
|
},
|
||||||
template: highlighterAnywhere,
|
|
||||||
replace: function (value) {
|
replace: function (value) {
|
||||||
if (this.isSettingValueArray) {
|
if (this.isSettingValueArray) {
|
||||||
return basicReplacer(value);
|
return basicReplacer(value);
|
||||||
|
@ -360,7 +355,6 @@ CliAutoComplete._initTextcomplete = function() {
|
||||||
}
|
}
|
||||||
searcher(term, callback, arr, 1);
|
searcher(term, callback, arr, 1);
|
||||||
},
|
},
|
||||||
template: highlighterAnywhere,
|
|
||||||
replace: function(value) {
|
replace: function(value) {
|
||||||
if (value in cache.resourcesCount) {
|
if (value in cache.resourcesCount) {
|
||||||
self.openLater();
|
self.openLater();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue