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)
|
if (slashpos > spacepos)
|
||||||
{
|
{
|
||||||
var snippetpart = raw.substring(slashpos);
|
var snippetpart = raw.substring(slashpos);
|
||||||
var snippet = snippets.find(s => s.command.startsWith(snippetpart));
|
|
||||||
if (snippet)
|
var matching = snippets
|
||||||
{
|
.filter(s => s.command.startsWith(snippetpart))
|
||||||
line += "<span style='color:lightgrey'>" + snippet.command.substr(pos - slashpos) + "</span>";
|
.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