Skip to main content

text_mirror_buffer_to_content

Function text_mirror_buffer_to_content 

Source
pub fn text_mirror_buffer_to_content(
    applied: MessageReader<'_, '_, TextEditApplied>,
    q: Query<'_, '_, (&TextBuffer, &TextCursor, &mut TextContent, Option<&mut TextInput>)>,
)
Expand description

Mirror system. After every successful edit, write the rope back into TextContent so the existing renderer / apply_text_bindings push path keeps reading the same shape. Also writes the byte cursor back into [TextInput.cursor] for legacy keystroke routes.

Gated on TextEditApplied (W3.2) - no per-tick sweep.