From e06763cd59da8b07255f46ab7e1abc4604c637cc Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 13 May 2018 03:18:41 +0100 Subject: [PATCH] show all slashcommands on / --- src/autocomplete/CommandProvider.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/autocomplete/CommandProvider.js b/src/autocomplete/CommandProvider.js index 0545095cf0..4f2aed3dc6 100644 --- a/src/autocomplete/CommandProvider.js +++ b/src/autocomplete/CommandProvider.js @@ -129,7 +129,14 @@ export default class CommandProvider extends AutocompleteProvider { if (!selection.beginning) return completions; const {command, range} = this.getCurrentCommand(query, selection); 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 { completion: result.command + ' ', component: (