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

Method move_end_styled

src/text_input.rs:898–910  ·  view source on GitHub ↗

Move to end in styled mode.

(&mut self, shift: bool)

Source from the content-addressed store, hash-verified

896
897 /// Move to end in styled mode.
898 pub fn move_end_styled(&mut self, shift: bool) {
899 let vis_len = self.cursor_len_styled();
900 if shift && self.selection_anchor.is_none() {
901 self.selection_anchor = Some(self.cursor_pos);
902 }
903 self.cursor_pos = vis_len;
904 if !shift {
905 self.selection_anchor = None;
906 } else if self.selection_anchor == Some(vis_len) {
907 self.selection_anchor = None;
908 }
909 self.cleanup_after_move();
910 }
911
912 /// Move cursor up one visual line in styled mode.
913 /// If `visual_lines` is provided (multiline with wrapping), uses them for navigation.

Callers 3

test_no_styles_move_leftFunction · 0.80
test_no_styles_home_endFunction · 0.80

Calls 2

cursor_len_styledMethod · 0.80
cleanup_after_moveMethod · 0.80

Tested by 2

test_no_styles_move_leftFunction · 0.64
test_no_styles_home_endFunction · 0.64