You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-term/src
Gabriel Hansson c1488267e5
(Updated) Apply motion API refinements (#6078)
* _apply_motion generalization where possible

API encourages users to not forget setting `editor.last_motion` when
applying a motion. But also not setting `last_motion` without applying a
motion first.

* (rename) will_find_char -> find_char

method name makes it sound like it would be returning a boolean.

* use _apply_motion in find_char

Feature that falls out from this is that repetitions of t,T,f,F are
saved with the context extention/move and count. (Not defaulting to extend
by 1 count).

* Finalize apply_motion API

last_motion is now a private field and can only be set by calling
Editor.apply_motion(). Removing need (and possibility) of writing:

`motion(editor); editor.last_motion = motion`

Now it's just: `editor.apply_motion(motion)`

* editor.last_message: rm Box wrap around Arc

* Use pre-existing `Direction` rather than custom `SearchDirection`.

* `LastMotion` type alias for `Option<Arc<dyn Fn(&mut Editor)>>`

* Take motion rather than cloning it.

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* last_motion as Option<Motion>.

* Use `Box` over `Arc` for `last_motion`.

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
12 months ago
..
commands Implement the wa! command (#7577) 12 months ago
keymap Remove Keymap(KeyTrie) and simply use KeyTrie. 1 year ago
ui make TS matching fallback to plaintext 1 year ago
application.rs use redraw handle for debouncing LSP messages (#7538) 12 months ago
args.rs Fix confusion with using --hsplit --vsplit on startup at same time (#4202) 2 years ago
commands.rs (Updated) Apply motion API refinements (#6078) 12 months ago
compositor.rs bump msrv to 1.63 (#5570) 1 year ago
config.rs Remove Keymap(KeyTrie) and simply use KeyTrie. 1 year ago
health.rs Refactor doc language servers to a HashMap, and the config to use a Vec to retain order 1 year ago
job.rs bump msrv to 1.63 (#5570) 1 year ago
keymap.rs Remove Keymap(KeyTrie) and simply use KeyTrie. 1 year ago
lib.rs Fix new clippy lints (#5892) 1 year ago
main.rs Initialize log and config files right after parsing arguments (#7585) 12 months ago