aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/movement.rs
Commit message (Collapse)AuthorAge
* Add object.movement for tree-sitter navigationGokul Soumya2022-02-15
|
* Add tree-sitter based function, class navigationGokul Soumya2022-02-15
|
* Apply recent nightly suggestions (#1286)Kirawi2021-12-18
| | | array iterators are now implicit
* Add trim_selections command (#1092)ath32021-11-14
|
* Ensure coords in screen depends on char width (#885)Ivan Tham2021-11-03
| | | | | The issue affected files with lots of tabs at the start as well. Fix #840
* Fixes for new clippy lints in Rust 1.54.Nathan Vegdahl2021-07-29
|
* Minor cleanup of the vertical movement code.Nathan Vegdahl2021-07-27
|
* Use `match` for branching on the `Direction` enum in more places.Nathan Vegdahl2021-07-27
|
* Collect some common patterns into methods on `Range`.Nathan Vegdahl2021-07-26
|
* Switch to a cleaner range-head moving abstraction.Nathan Vegdahl2021-07-24
| | | | Also fix a bunch of bugs related to it.
* Revert display-width-based vertical cursor movement.Nathan Vegdahl2021-07-22
| | | | Still needs to be done, but should be part of a separate PR.
* Fixes for misc bugs with view movement.Nathan Vegdahl2021-07-21
|
* Handle edge case in `range_to_target()` correctly.Nathan Vegdahl2021-07-19
|
* Update word selection/navigation to work with gap indexing.Nathan Vegdahl2021-07-19
| | | | | | Also tweaked some of the existing behavior that seemed inconsistent and/or buggy. It's mostly identical, just a few corner cases are different.
* 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
* | Make vertical selection movement work properly.Nathan Vegdahl2021-07-06
| |
* | Make horizontal selection movement work properly.Nathan Vegdahl2021-07-02
| |
* | Allow last line in file to lack a line break character.Nathan 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.
* Incorporate long word commands into keymapPabloMansanet2021-06-29
|
* Add long word unit testsPabloMansanet2021-06-29
|
* Add long word motion implementationPabloMansanet2021-06-29
|
* Add function to get the line ending of a str slice.Nathan Vegdahl2021-06-21
| | | | This is needed in some places.
* Work on moving code over to LineEnding instead of assuming '\n'.Nathan Vegdahl2021-06-20
| | | | Also some general cleanup and some minor fixes along the way.
* Misc fixes and clean up of line ending detect code.Nathan Vegdahl2021-06-20
|
* added the line_end helper functionJan Hrastnik2021-06-20
|
* changed some hardcoded newlines, removed a else if in line_ending.rsJan Hrastnik2021-06-19
|
* 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
* Derive debug without featureIvan Tham2021-06-10
| | | | Note that this also removed those `finish_non_exhaustive()`.
* Implement Debug for data structure as a featurenotoria2021-06-10
|
* Fix Unicode (#135)Kirawi2021-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * wip * wip * fix unicode break * fix unicode break * Update helix-core/src/transaction.rs Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu> * clippy * fix * add changes * added test * wip * wip * wip * wip * fix * fix view * fix #88 Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
* Fix panic when moving over unicode punctuationBenoît CORTIER2021-06-07
| | | | | | | | | | | | `is_ascii_punctuation` will only work for ASCII punctuations, and when we have unicode punctuation (or other) we jump into the `unreachable`. This patch fallback into categorizing everything in this branch as `Unknown`. Fixes https://github.com/helix-editor/helix/issues/123 https://github.com/helix-editor/helix/pull/135: add better support for unicode categories.
* Add ctrl-w in insert modeIvan Tham2021-06-06
| | | | | It seemed to panic when I pressed too many times, but that is from lsp side.
* Add unreachable contextIvan Tham2021-06-05
| | | Better error for #123
* Fixing Multiple Panics (#121)Kirawi2021-06-05
| | | | | | | * init * wip * wip
* Better fix for w/e that also covers `ia<esc>we`/`ia<esc>wb`Blaž Hrastnik2021-06-02
|
* Fix panics when triggering w or e on the last char of the lineBlaž Hrastnik2021-06-02
| | | | Closes #32
* fix: Don't allow moving past last line, fixes #30, #24Blaž Hrastnik2021-06-02
| | | | Off by 1 error
* Categorize _ as a word char, not punctuationBlaž Hrastnik2021-05-31
|
* Allow moving to EOL byte, also fixes #15Blaž Hrastnik2021-05-31
|
* Fix selection rendering, it would be off by 1 if reverse.Blaž Hrastnik2021-04-07
|
* clippy lintBlaž Hrastnik2021-04-06
|
* w, b, e: Match kakoune's behavior in selecting by default.Blaž Hrastnik2021-04-05
| | | | | I initially preferred only moving the cursor, but selecting the whole word is a lot nicer for things like wd (instead of vwd).
* Finish hiding doc.state / State as an implementation detail.Blaž Hrastnik2021-03-18
|
* Move things out of state.rs.Blaž Hrastnik2021-03-18