mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-08-22 07:16:03 +00:00
docs: note mid-string caret limitation for token-aware autocorrect
Callers that only pass text.count still autocorrect inside earlier sigil tokens — track as a v1 limit until selection is available. Signed-off-by: Taksh <takshkothari09@gmail.com>
This commit is contained in:
parent
d43440d79e
commit
d1ce261d93
@ -15,6 +15,10 @@ import Foundation
|
||||
/// of those sigils; leave it on otherwise. The composer TextField only exposes
|
||||
/// the text (not a live selection), so callers pass the caret — typically the
|
||||
/// end of the string, matching autocomplete.
|
||||
///
|
||||
/// Mid-string caret is a known v1 limitation: when callers only know
|
||||
/// `text.count`, moving the caret back into an existing `/` `@` `#` token
|
||||
/// still leaves autocorrect on. Plumb selection through when SwiftUI exposes it.
|
||||
enum ComposerAutocorrect {
|
||||
/// Sigils that mean "exact token, don't rewrite me".
|
||||
static let specialPrefixes: Set<Character> = ["/", "@", "#"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user