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

Function visual_line_home

src/text_input.rs:1699–1702  ·  view source on GitHub ↗

Move to start of current visual line. Returns the new global cursor position.

(visual_lines: &[VisualLine], cursor_pos: usize)

Source from the content-addressed store, hash-verified

1697
1698/// Move to start of current visual line. Returns the new global cursor position.
1699pub fn visual_line_home(visual_lines: &[VisualLine], cursor_pos: usize) -> usize {
1700 let (line, _col) = cursor_to_visual_pos(visual_lines, cursor_pos);
1701 visual_lines[line].global_char_start
1702}
1703
1704/// Move to end of current visual line. Returns the new global cursor position.
1705pub fn visual_line_end(visual_lines: &[VisualLine], cursor_pos: usize) -> usize {

Callers 1

Calls 1

cursor_to_visual_posFunction · 0.85

Tested by

no test coverage detected