zed/crates/vim/test_data
Conrad Irwin 2e23527e09
Refactor key dispatch (#14942)
Simplify key dispatch code.

Previously we would maintain a cache of key matchers for each context
that
would store the pending input. For the last while we've also stored the
typed prefix on the window. This is redundant, we only need one copy, so
now
it's just stored on the window, which lets us avoid the boilerplate of
keeping
all the matchers in sync.

This stops us from losing multikey bindings when the context on a node
changes
(#11009) (though we still interrupt multikey bindings if the focus
changes).

While in the code, I fixed up a few other things with multi-key bindings
that
were causing problems:

Previously we assumed that all multi-key bindings took precedence over
any
single-key binding, now this is done such that if a user binds a
single-key
binding, it will take precedence over all system-defined multi-key
bindings
(irrespective of the depth in the context tree). This was a common cause
of
confusion for new users trying to bind to `cmd-k` or `ctrl-w` in vim
mode
(#13543).

Previously after a pending multi-key keystroke failed to match, we would
drop
the prefix if it was an input event. Now we correctly replay it
(#14725).

Release Notes:

- Fixed multi-key shortcuts not working across completion menu changes
([#11009](https://github.com/zed-industries/zed/issues/11009))
- Fixed multi-key shortcuts discarding earlier input
([#14445](https://github.com/zed-industries/zed/pull/14445))
- vim: Fixed `jk` binding preventing you from repeating `j`
([#14725](https://github.com/zed-industries/zed/issues/14725))
- vim: Fixed `escape` in normal mode to also clear the selected
register.
- Fixed key maps so user-defined mappings take precedence over builtin
multi-key mappings
([#13543](https://github.com/zed-industries/zed/issues/13543))
- Fixed a bug where overridden shortcuts would still show in the Command
Palette
2024-07-22 10:46:16 -06:00
..
neovim_backed_test_context_works.json
test_a.json
test_b.json
test_backspace.json
test_builtin_marks.json
test_capital_f_and_capital_t.json
test_caret_mark.json
test_cc.json
test_cgn_nomatch.json
test_cgn_repeat.json
test_change_0.json
test_change_b.json
test_change_backspace.json
test_change_case.json
test_change_case_motion.json
test_change_cc.json
test_change_e.json
test_change_end_of_document.json
test_change_end_of_line.json
test_change_gg.json
test_change_h.json
test_change_j.json
test_change_k.json
test_change_l.json
test_change_list_delete.json
test_change_list_insert.json
test_change_paragraph_object.json
test_change_sentence_object.json
test_change_surrounding_character_objects.json
test_change_w.json
test_change_word_object.json
test_clear_counts.json
test_comma_semicolon.json
test_comma_w.json
test_command_basics.json
test_command_goto.json
test_command_replace.json
test_command_search.json
test_convert_to_lower_case.json
test_convert_to_upper_case.json
test_ctrl_d_u.json
test_ctrl_w_override.json Refactor key dispatch (#14942) 2024-07-22 10:46:16 -06:00
test_d_search.json
test_dd.json
test_delete_0.json
test_delete_b.json
test_delete_end_of_document.json
test_delete_end_of_line.json
test_delete_gg.json
test_delete_h.json
test_delete_j.json
test_delete_k.json
test_delete_l.json
test_delete_left.json
test_delete_next_word_end.json
test_delete_paragraph_object.json
test_delete_sentence_object.json
test_delete_surrounding_character_objects.json
test_delete_to_adjacent_character.json
test_delete_to_end_of_line.json
test_delete_w.json
test_delete_with_counts.json
test_delete_word_object.json
test_dgn_repeat.json
test_dot_mark.json
test_dot_repeat.json
test_dw_eol.json
test_end_of_document.json
test_end_of_line_downward.json
test_end_of_line_with_neovim.json
test_end_of_word.json
test_enter.json
test_enter_visual_line_mode.json
test_enter_visual_mode.json
test_escape_while_waiting.json Refactor key dispatch (#14942) 2024-07-22 10:46:16 -06:00
test_f_and_t.json
test_find_multibyte.json
test_folds.json
test_folds_panic.json
test_gg.json
test_gi.json
test_gn.json
test_gv.json
test_h.json
test_h_through_unicode.json
test_increment.json
test_increment_radix.json
test_increment_steps.json
test_increment_with_dot.json
test_increment_with_two_dots.json
test_insert_ctrl_r.json
test_insert_end_of_line.json
test_insert_first_non_whitespace.json
test_insert_line_above.json
test_insert_with_counts.json
test_insert_with_repeat.json
test_j.json
test_jk.json
test_join_lines.json
test_jump_to_end.json
test_jump_to_first_non_whitespace.json
test_jump_to_line_boundaries.json
test_k.json
test_l.json
test_lowercase_marks.json
test_lt_gt_marks.json
test_marks.json
test_matching.json
test_multiline_surrounding_character_objects.json
test_named_registers.json
test_neovim.json
test_next_line_start.json
test_next_word_end_newline_last_char.json
test_numbered_registers.json
test_o.json
test_paragraph_object_with_landing_positions_not_at_beginning_of_line.json
test_paragraphs_dont_wrap.json
test_paste.json
test_paste_count.json
test_paste_visual.json
test_paste_visual_block.json
test_percent.json
test_period_mark.json
test_plus_minus.json
test_previous_word_end.json
test_r.json
test_record_replay.json
test_record_replay_count.json
test_record_replay_dot.json
test_record_replay_interleaved.json
test_record_replay_of_dot.json
test_remap_adjacent_dog_cat.json Refactor key dispatch (#14942) 2024-07-22 10:46:16 -06:00
test_remap_nested_pineapple.json Refactor key dispatch (#14942) 2024-07-22 10:46:16 -06:00
test_repeat_motion_counts.json
test_repeat_over_blur.json
test_repeat_visual.json
test_repeated_cb.json
test_repeated_ce.json
test_repeated_cj.json
test_repeated_cl.json
test_repeated_word.json
test_replace_mode.json
test_replace_mode_repeat.json
test_replace_mode_undo.json
test_replace_mode_with_counts.json
test_replace_with_range.json
test_replace_with_range_at_start.json
test_selection_goal.json
test_shift_y.json
test_singleline_surrounding_character_objects.json
test_singleline_surrounding_character_objects_with_escape.json
test_special_registers.json
test_start_end_of_paragraph.json
test_substitute_line.json
test_undo.json
test_undo_repeated_insert.json
test_v_search.json
test_visual_block_insert.json
test_visual_block_issue_2123.json
test_visual_block_mode.json
test_visual_block_search.json
test_visual_change.json
test_visual_delete.json
test_visual_line_change.json
test_visual_line_delete.json
test_visual_match_eol.json
test_visual_object.json
test_visual_paragraph_object.json
test_visual_sentence_object.json
test_visual_shift_d.json
test_visual_star_hash.json
test_visual_word_object.json
test_visual_yank.json
test_w.json
test_window_bottom.json
test_window_middle.json
test_window_top.json
test_wrapped_lines.json
test_wrapped_motions.json
test_x.json
test_zero.json