MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / selection_extracts_rope_slice

Function selection_extracts_rope_slice

src/editor/buffer.rs:453–460  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

451
452 #[test]
453 fn selection_extracts_rope_slice() {
454 let mut buffer = EditorBuffer::from_str("one\ntwo\nthree");
455 buffer.set_cursor(0, 1);
456 buffer.start_selection();
457 buffer.set_cursor(2, 2);
458
459 assert_eq!(buffer.selected_text().as_deref(), Some("ne\ntwo\nth"));
460 }
461
462 #[test]
463 fn undo_reverts_insert_delete_and_newline() {

Callers

nothing calls this directly

Calls 2

set_cursorMethod · 0.80
start_selectionMethod · 0.80

Tested by

no test coverage detected