Move to end of current visual line. Returns the new global cursor position.
(visual_lines: &[VisualLine], cursor_pos: usize)
| 1703 | |
| 1704 | /// Move to end of current visual line. Returns the new global cursor position. |
| 1705 | pub fn visual_line_end(visual_lines: &[VisualLine], cursor_pos: usize) -> usize { |
| 1706 | let (line, _col) = cursor_to_visual_pos(visual_lines, cursor_pos); |
| 1707 | visual_lines[line].global_char_start + visual_lines[line].char_count |
| 1708 | } |
| 1709 | |
| 1710 | /// Find the nearest character boundary for a given pixel x-position. |
| 1711 | /// `char_x_positions` has len = char_count + 1 (position 0 = left edge, position n = right edge). |
no test coverage detected