aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/selection.rs
Commit message (Collapse)AuthorAge
* Update surround commands to work with gap indexing.Nathan Vegdahl2021-07-08
|
* Implement `Range::put()` which manages range movements and extensions.Nathan Vegdahl2021-07-08
| | | | | In particular, this wraps the annoying logic involved in keeping the cursor width to 1 grapheme.
* Merge branch 'master' into great_line_ending_and_cursor_range_cleanupNathan Vegdahl2021-07-06
|\
| * Add object selection (textobjects) (#385)Gokul Soumya2021-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add textobjects for word * Add textobjects for surround characters * Apply clippy lints * Remove ThisWordPrevBound in favor of PrevWordEnd It's the same as PrevWordEnd except for taking the current char into account, so use a "flag" to capture that usecase * Add tests for PrevWordEnd movement * Remove ThisWord* movements They did not preserve anchor positions and were only used for textobject boundary search anyway so replace them with simple position finding functions * Rewrite tests of word textobject * Add tests for surround textobject * Add textobject docs * Refactor textobject word position functions * Apply clippy lints on textobject * Fix overflow error with textobjects
* | Fix a couple additional `unused` warnings after merge.Nathan Vegdahl2021-07-02
| |
* | Merge branch 'master' into great_line_ending_and_cursor_range_cleanupNathan Vegdahl2021-07-02
|\|
| * Fix all remaining warnings in helix-core except for two.Nathan Vegdahl2021-07-02
| | | | | | | | | | I'm not sure how to address them, because they look like they might be bugs, and code is involved. Will poke the relevant people.
| * Remove #[allow(unused)] from helix-core, and fix unused imports.Nathan Vegdahl2021-07-02
| | | | | | | | Still a bunch more warnings to fix in core, but it's a start.
* | Ensure a minimum selection width on commands that need it.Nathan Vegdahl2021-07-01
| |
* | Make `Selection`'s normalize and transform methods self-consuming only.Nathan Vegdahl2021-07-01
| |
* | Clean up `Selection` to not use so many allocations.Nathan Vegdahl2021-07-01
| |
* | Better validation method APIs for `Range`.Nathan Vegdahl2021-07-01
| | | | | | | | | | This way they do less work, are more specific to what we actually need, and they compose.
* | Add `Range` methods for various kinds of validation.Nathan Vegdahl2021-07-01
| |
* | Change the `Range` type and associated functions to gap indexing.Nathan Vegdahl2021-07-01
|/
* fix: Correctly merge multiple selection ranges togetherBlaž Hrastnik2021-06-30
| | | | Fixes #391
* fix: Select matching at the start of the doc could crash. Fixes #346Blaž Hrastnik2021-06-23
|
* Movement fixes, refactor and unit test suite (#217)PabloMansanet2021-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fixing Multiple Panics (#121)Kirawi2021-06-05
| | | | | | | * init * wip * wip
* LintBlaž Hrastnik2021-05-09
|
* Fix overlap calculation.Blaž Hrastnik2021-04-10
|
* N as extend with search (for now, N should be search_prev).Blaž Hrastnik2021-04-09
|
* Fix range.overlap()Blaž Hrastnik2021-04-09
|
* Store intra-files jumps (goto) on the jumplist.Blaž Hrastnik2021-03-29
|
* clippy lintBlaž Hrastnik2021-03-24
|
* Provide a capacity on Selection::new's normalize.Blaž Hrastnik2021-03-22
|
* clippy lintsBlaž Hrastnik2021-03-22
|
* Selection: fail early if new() is called with no ranges.Blaž Hrastnik2021-03-22
|
* Implement auto-pairs behavior for open and close.Blaž Hrastnik2021-03-22
|
* Implement iter() and len() directly on Selection.Blaž Hrastnik2021-03-19
|
* Implement keep_selections (filter selections on regex).Blaž Hrastnik2021-03-15
|
* Cleanup: use doc.selection() instead of doc.state.selection().Blaž Hrastnik2021-03-14
|
* commands: add * as selection search.Blaž Hrastnik2021-02-22
|
* treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by refBlaž Hrastnik2021-02-18
|
* minor changesBlaž Hrastnik2021-02-17
|
* Finally: Retain horizontal position when moving vertically.Blaž Hrastnik2021-02-12
|
* simplify.Blaž Hrastnik2021-02-05
|
* commands: Implement select_on_matches.Blaž Hrastnik2021-01-22
|
* Introduce Selection::point.Blaž Hrastnik2020-12-03
|
* Fix compose not merging certain changesets correctly.Blaž Hrastnik2020-10-14
|
* Indent draft, linewise pasteBlaž Hrastnik2020-10-13
|
* Simple yank/paste registers.Blaž Hrastnik2020-10-13
|
* Split on matches off by one, breaks tests again.Blaž Hrastnik2020-10-13
|
* Fix test, break split + appendBlaž Hrastnik2020-09-29
|
* Split selection on regex, fix InputEdit generation.Blaž Hrastnik2020-09-28
|
* Extend selection commands.Blaž Hrastnik2020-09-28
|
* Simplify some more code.Blaž Hrastnik2020-09-13
|
* Change -> Operation, Change2 -> ChangeBlaž Hrastnik2020-09-13
|
* Get rid of a bunch of clones.Blaž Hrastnik2020-09-12
|
* Expand transaction API.Blaž Hrastnik2020-09-07
|
* Work on insert mode.Blaž Hrastnik2020-09-07
|