From 553c8a070132d122b71f004fedc87baa98446d5d Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 17 Oct 2023 17:11:04 +0200 Subject: [PATCH] changed: autocomplete multiple tags --- main.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 71b6cc5..d2c686d 100644 --- a/main.js +++ b/main.js @@ -2112,11 +2112,14 @@ function applycolors() if (slashpos > spacepos) { var snippetpart = raw.substring(slashpos); - var snippet = snippets.find(s => s.command.startsWith(snippetpart)); - if (snippet) - { - line += "" + snippet.command.substr(pos - slashpos) + ""; - } + + var matching = snippets + .filter(s => s.command.startsWith(snippetpart)) + .map(s => s.command.substring(1)); + + line += ""; + line += matching.join().substr(pos - slashpos - 1); + line += ""; } } }