encodeTextReplacement
Encodes one logical text replacement around the active cursor.
The default implementation preserves compatibility for lightweight host adapters. Session-backed implementations should serialize the entire operation as one outbound unit, and production encoders may batch the repeated deletion sequences.
Parameters
event
deletion counts and replacement text.