diff options
author | PabloMansanet | 2021-06-11 12:57:07 +0000 |
---|---|---|
committer | GitHub | 2021-06-11 12:57:07 +0000 |
commit | 86af55c379c531df2d5dbc72841e28a10fc7938e (patch) | |
tree | d2946657e2ca0102c7ddf291b0ffb9819ab001d9 /helix-core/src/auto_pairs.rs | |
parent | 0c2b99327a60d478ff6a4e4a2a15f69e61857569 (diff) |
Movement fixes, refactor and unit test suite (#217)
* Add convenience/clarity wrapper for Range initialization
* Test horizontal moves
* Add column jumping tests
* Add failing movement conditions for multi-word moves
* Refactor skip_over_next
* Add complex forward movement unit tests
* Add strict whitespace checks and edge case tests
* Restore formatting
* Remove unused function
* Add empty test case for deletion and fix nth_prev_word_boundary
* Add tests for backward motion
* Refactor word movement
* Address review comments and finish refactoring backwards move
* Finish unit test suite
* Fmt pass
* Fix lint erors
* Clean up diff restoring bad 'cargo fmt' actions
* Simplify movement closures (thanks Pickfire)
* Fmt pass
* Replace index-based movement with iterator based movement, ensuring that each move incurs a single call to the RopeSlice API
* Break down tuple function
* Extract common logic to all movement functions
* Split iterator helpers away into their own module
* WIP reducing clones
* Operate on spans
* WIP simplifying iterators
* Simplify motion helpers
* Fix iterator
* Fix all unit tests
* Refactor and simplify
* Simplify fold
Diffstat (limited to 'helix-core/src/auto_pairs.rs')
-rw-r--r-- | helix-core/src/auto_pairs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/auto_pairs.rs b/helix-core/src/auto_pairs.rs index a04b0d3e..74e25ac9 100644 --- a/helix-core/src/auto_pairs.rs +++ b/helix-core/src/auto_pairs.rs @@ -67,7 +67,7 @@ fn handle_open( let mut offs = 0; - let mut transaction = Transaction::change_by_selection(doc, selection, |range| { + let transaction = Transaction::change_by_selection(doc, selection, |range| { let pos = range.head; let next = next_char(doc, pos); @@ -109,7 +109,7 @@ fn handle_close(doc: &Rope, selection: &Selection, _open: char, close: char) -> let mut offs = 0; - let mut transaction = Transaction::change_by_selection(doc, selection, |range| { + let transaction = Transaction::change_by_selection(doc, selection, |range| { let pos = range.head; let next = next_char(doc, pos); |