mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): replace the whole +: token when picking a reaction emoji (#1916)
This commit is contained in:
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));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user