make consecutive :/@/# separate pill candidates

e.g. accept the first character always to start the autocompletion
but after that refer to the plainpart logic to split up in
new pill candidates. Also, don't allow merging adjacent parts.

This makes sure that "@nonmatchingfoo @someuser"
only matches "someuser" in the autocomplete.
pull/21833/head
Bruno Windels 2019-05-24 12:38:19 +02:00
parent a024fd8991
commit cf5e4d3d94
1 changed files with 10 additions and 2 deletions

View File

@ -313,8 +313,16 @@ export class PillCandidatePart extends PlainPart {
return this._autoCompleteCreator(updateCallback);
}
acceptsInsertion(chr) {
acceptsInsertion(chr, i) {
if (i === 0) {
return true;
} else {
return super.acceptsInsertion(chr, i);
}
}
merge() {
return false;
}
acceptsRemoval(position, chr) {