show all slashcommands on /

pull/21833/head
Matthew Hodgson 2018-05-13 03:18:41 +01:00
parent 5605439e76
commit e06763cd59
1 changed files with 8 additions and 1 deletions

View File

@ -129,7 +129,14 @@ export default class CommandProvider extends AutocompleteProvider {
if (!selection.beginning) return completions; if (!selection.beginning) return completions;
const {command, range} = this.getCurrentCommand(query, selection); const {command, range} = this.getCurrentCommand(query, selection);
if (command) { if (command) {
completions = this.matcher.match(command[0]).map((result) => { let results;
if (command[0] == '/') {
results = COMMANDS;
}
else {
results = this.matcher.match(command[0]);
}
completions = results.map((result) => {
return { return {
completion: result.command + ' ', completion: result.command + ' ',
component: (<TextualCompletion component: (<TextualCompletion