changed: autocomplete multiple tags
This commit is contained in:
parent
a38c7f9e58
commit
553c8a0701
13
main.js
13
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 += "<span style='color:lightgrey'>" + snippet.command.substr(pos - slashpos) + "</span>";
|
||||
}
|
||||
|
||||
var matching = snippets
|
||||
.filter(s => s.command.startsWith(snippetpart))
|
||||
.map(s => s.command.substring(1));
|
||||
|
||||
line += "<span style='color:lightgrey'>";
|
||||
line += matching.join().substr(pos - slashpos - 1);
|
||||
line += "</span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue