pub fn find_prev_word_start(text: &Rope, cursor_byte: usize) -> usizeExpand description
Finds the start offset of the previous word (or punctuation token) moving backward from cursor_byte.
Behavior matches classic editor Ctrl + Left:
- If preceded by whitespace (non-newline), skips backward across the whitespace.
- If preceded by a newline, stops at that line boundary.
- Identifies whether the preceding token is a word or punctuation sequence.
- Moves backward across consecutive characters of that same kind.
- Returns the starting byte offset of that token.