helix-mirror/helix-term
Michael Davis 274f2ea459 Use requested direction for new textobject selection range
This changes the behavior of operations like `]f`/`[f` to set the
direction of the new range to the direction of the action.

The original behavior was to always use the head of the next function.
This is inconsistent with the behavior of goto_next_paragraph and makes
it impossible to create extend variants of the textobject motions.

This causes a behavior change when there are nested functions. The
behavior in the parent commit is that repeated uses of `]f` will
select every function in the file even if nested. With this commit,
functions are skipped.

It's notable that it's possible to emulate the original behavior by
using the `ensure_selections_forward` (A-:) command between invocations
of `]f`.
2022-10-03 10:44:08 -04:00
..
src Use requested direction for new textobject selection range 2022-10-03 10:44:08 -04:00
tests fix: Recalculate completion when going through prompt history (#3193) 2022-09-01 01:26:21 +09:00
.gitignore Initial import. 2020-05-20 18:14:51 +09:00
build.rs feat: support grammar cross-compilation 2022-08-02 12:04:09 +09:00
Cargo.toml build(deps): bump once_cell from 1.14.0 to 1.15.0 (#3987) 2022-09-26 18:19:50 -05:00