diff options
author | Blaž Hrastnik | 2021-03-18 04:28:27 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-18 04:39:56 +0000 |
commit | 8eaf9a432d14b6c2dd084dabbea606e4b1e3baa0 (patch) | |
tree | a353a3a9182622b8434165825e03e2264bb444ea /helix-core/src/syntax.rs | |
parent | 51c15da3c32b2f0bf3da6db9bca9496d333ec15a (diff) |
Make Transaction::change only rely on the rope.
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r-- | helix-core/src/syntax.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 2ad06bef..3d665953 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -1591,7 +1591,7 @@ fn test_input_edits() { let mut state = State::new("hello world!\ntest 123".into()); let transaction = Transaction::change( - &state, + &state.doc, vec![(6, 11, Some("test".into())), (12, 17, None)].into_iter(), ); let edits = LanguageLayer::generate_edits(state.doc.slice(..), &transaction.changes); @@ -1621,7 +1621,8 @@ fn test_input_edits() { // Testing with the official example from tree-sitter let mut state = State::new("fn test() {}".into()); - let transaction = Transaction::change(&state, vec![(8, 8, Some("a: u32".into()))].into_iter()); + let transaction = + Transaction::change(&state.doc, vec![(8, 8, Some("a: u32".into()))].into_iter()); let edits = LanguageLayer::generate_edits(state.doc.slice(..), &transaction.changes); transaction.apply(&mut state); |