MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / find_word_delete_boundary_right_visual

Function find_word_delete_boundary_right_visual

src/text_input.rs:2571–2576  ·  view source on GitHub ↗

Find word delete boundary right in visual space (skips word then spaces). Used for Ctrl+Delete to delete word + trailing whitespace.

(raw: &str, visual_pos: usize)

Source from the content-addressed store, hash-verified

2569 /// Find word delete boundary right in visual space (skips word then spaces).
2570 /// Used for Ctrl+Delete to delete word + trailing whitespace.
2571 pub fn find_word_delete_boundary_right_visual(raw: &str, visual_pos: usize) -> usize {
2572 let cp = cursor_to_content(raw, visual_pos);
2573 let stripped = strip_styling(raw);
2574 let boundary = super::find_word_delete_boundary_right(&stripped, cp);
2575 content_to_cursor(raw, boundary, false)
2576 }
2577
2578 /// Find word at a visual position (for double-click selection).
2579 /// Returns (start, end) in visual positions.

Callers 1

Calls 4

cursor_to_contentFunction · 0.85
strip_stylingFunction · 0.85
content_to_cursorFunction · 0.85

Tested by

no test coverage detected