don't run parser for getNameAt if text has not changed
This commit is contained in:
parent
acdfd10752
commit
10e786dfd3
|
@ -178,11 +178,13 @@ export class SlashCommandParser {
|
||||||
* @param {*} index Index to check for names (cursor position).
|
* @param {*} index Index to check for names (cursor position).
|
||||||
*/
|
*/
|
||||||
getNameAt(text, index) {
|
getNameAt(text, index) {
|
||||||
try {
|
if (this.text != `{:${text}:}`) {
|
||||||
this.parse(text, false);
|
try {
|
||||||
} catch (e) {
|
this.parse(text, false);
|
||||||
// do nothing
|
} catch (e) {
|
||||||
console.warn(e);
|
// do nothing
|
||||||
|
console.warn(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
index += 2;
|
index += 2;
|
||||||
const executor = this.commandIndex
|
const executor = this.commandIndex
|
||||||
|
|
Loading…
Reference in New Issue