Skip to main content

Crate fret_text_nav

Crate fret_text_nav 

Source
Expand description

Text navigation helpers shared across Fret surfaces.

This crate centralizes v1 “word” and “line” semantics used by:

  • core text widgets (TextInput, TextArea, SelectableText)
  • ecosystem code editor surfaces

The active word-boundary mode (UnicodeWord vs Identifier) remains a policy input (TextBoundaryMode). This crate only provides deterministic algorithms for those modes.

Normative behavior is defined by:

  • ADR 0179: Text Navigation and Word Boundaries (v1)
  • ADR 0044: Text editing command vocabulary and UTF-8 byte indices (clamping rules)

Functions§

clamp_to_char_boundary
clamp_to_grapheme_boundary
clamp_to_grapheme_boundary_down
clamp_to_grapheme_boundary_up
is_grapheme_boundary
move_word_left
move_word_right
next_char_boundary
next_grapheme_boundary
prev_char_boundary
prev_grapheme_boundary
select_line_range
select_word_range