fix(app): replace the whole +: token when picking a reaction emoji (#1916)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-24 12:45:02 +02:00
1 parent b1fb2c14a1
commit 9efd2b0a73
2 files changed
+6 -2

No files matched your search

@@ -28,6 +28,10 @@ export function getComposerAutocompleteReplacementStart(
if (type === 'commandArg') {
return Math.max(0, textUpToCursor.length - (matchedArgument == null ? 0 : matchedArgument.length));
}
if (type === 'emojiReaction') {
const whole = match[0] == null ? '' : match[0];
return Math.max(0, (match.index == null ? 0 : match.index) + (whole.length - whole.trimStart().length));
}
return Math.max(0, (match.index == null ? 0 : match.index) + (matchedPrefix == null ? 0 : matchedPrefix.length));
}