Fix command and property completions
This commit is contained in:
parent
1e39fed618
commit
f555e1348c
1 changed files with 7 additions and 0 deletions
|
@ -113,6 +113,9 @@ const getSetCompletions = (command, keywords) => {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}).flat();
|
}).flat();
|
||||||
|
if (items.length === 0) {
|
||||||
|
return Promise.resolve([]);
|
||||||
|
}
|
||||||
return Promise.resolve([
|
return Promise.resolve([
|
||||||
{
|
{
|
||||||
name: 'Properties',
|
name: 'Properties',
|
||||||
|
@ -126,6 +129,10 @@ const complete = (line, settings) => {
|
||||||
let words = trimmed.split(/ +/);
|
let words = trimmed.split(/ +/);
|
||||||
let name = words[0];
|
let name = words[0];
|
||||||
if (words.length === 1) {
|
if (words.length === 1) {
|
||||||
|
let items = completeCommands(name);
|
||||||
|
if (items.length === 0) {
|
||||||
|
return Promise.resolve([]);
|
||||||
|
}
|
||||||
return Promise.resolve([
|
return Promise.resolve([
|
||||||
{
|
{
|
||||||
name: 'Console Command',
|
name: 'Console Command',
|
||||||
|
|
Reference in a new issue