zed/crates
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
..
activity_indicator Start on adding support for editing via the assistant panel (#14795) 2024-07-19 11:13:15 +02:00
anthropic Allow using a custom model when using zed.dev (#14933) 2024-07-22 12:25:53 +02:00
assets Move from Zed fonts to IBM Plex (#13596) 2024-06-27 14:36:44 -06:00
assistant Allow using a custom model when using zed.dev (#14933) 2024-07-22 12:25:53 +02:00
assistant_slash_command Lay the groundwork for collaborating on assistant panel (#13991) 2024-07-10 17:36:22 +02:00
assistant_tooling Bring the Tool Calling README up to date (#11683) 2024-05-12 04:47:19 -07:00
audio Make tests less noisy (#12463) 2024-05-29 18:06:45 -07:00
auto_update Fix file name conflict when downloading app update (#14847) 2024-07-19 16:33:41 -07:00
breadcrumbs breadcrumbs: Use early return in set_active_pane_item (#14691) 2024-07-17 18:58:44 -04:00
call Remove never-used client parameter from message handler functions (#13406) 2024-06-22 16:07:36 -07:00
channel Remove never-used client parameter from message handler functions (#13406) 2024-06-22 16:07:36 -07:00
cli Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
client client: Remove leftover http.rs file (#14822) 2024-07-19 12:22:31 -04:00
clock Lay the groundwork for collaborating on assistant panel (#13991) 2024-07-10 17:36:22 +02:00
collab Allow using a custom model when using zed.dev (#14933) 2024-07-22 12:25:53 +02:00
collab_ui Use defaults for unchanged TextStyle fields (#14918) 2024-07-21 11:55:45 -04:00
collections gpui: Add SVG rendering to img element and generic asset cache (#9931) 2024-03-29 17:09:49 -07:00
command_palette Add command aliases (#14826) 2024-07-19 12:48:48 -06:00
command_palette_hooks Introduce InlineCompletionProvider (#9777) 2024-03-26 13:28:06 +01:00
completion Allow using a custom model when using zed.dev (#14933) 2024-07-22 12:25:53 +02:00
copilot Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
db paths: Replace lazy_static! with OnceLock (#13213) 2024-06-18 12:22:37 -04:00
dev_server_projects remoting: Allow Add/Remove remote folder (#14532) 2024-07-16 12:01:59 -06:00
diagnostics lsp: Pass back diagnostic .data when querying code actions for it (#14962) 2024-07-22 17:49:11 +02:00
editor Add button to copy SHA from Git blame (#14883) 2024-07-21 12:02:16 -04:00
extension Ensure ExtensionBuilder respects the proxy settings (#14899) 2024-07-21 10:46:43 -04:00
extension_api zed_extension_api: Return structured slash command completions (#13879) 2024-07-05 14:08:42 -04:00
extension_cli Ensure ExtensionBuilder respects the proxy settings (#14899) 2024-07-21 10:46:43 -04:00
extensions_ui Use defaults for unchanged TextStyle fields (#14918) 2024-07-21 11:55:45 -04:00
feature_flags Add an experimental, WIP diagnostics grouping panel (#14515) 2024-07-15 22:58:18 +03:00
feedback Refine inline transformation UX (#12939) 2024-06-13 08:35:22 +02:00
file_finder remoting: Allow Add/Remove remote folder (#14532) 2024-07-16 12:01:59 -06:00
file_icons Make tests less noisy (#12463) 2024-05-29 18:06:45 -07:00
fs Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
fsevent Retain run loop (#11241) 2024-04-30 23:31:59 -06:00
fuzzy Introduce an outline panel (#12637) 2024-06-12 23:22:52 +03:00
git Introduce an outline panel (#12637) 2024-06-12 23:22:52 +03:00
git_hosting_providers Extract http from util (#11680) 2024-05-10 15:50:20 -06:00
go_to_line Add more menus to Zed (#12940) 2024-06-18 12:16:54 -07:00
google_ai Respect requested gemini model (#13427) 2024-06-23 14:10:31 -06:00
gpui Refactor key dispatch (#14942) 2024-07-22 10:46:16 -06:00
gpui_macros Upsell built-in features on the extensions page (#14516) 2024-07-15 17:10:01 -04:00
headless remoting: Allow Add/Remove remote folder (#14532) 2024-07-16 12:01:59 -06:00
html_to_markdown Publish html_to_markdown (#13718) 2024-07-01 17:18:58 -04:00
http http: Refactor construction of HTTP clients with a proxy (#14911) 2024-07-21 10:15:38 -04:00
image_viewer Add text_color helper for tab contents (#14737) 2024-07-18 09:27:05 -04:00
indexed_docs assistant: Allow /docs to perform JIT indexing when run (#14768) 2024-07-18 17:01:48 -04:00
inline_completion_button Add Sign Out link for Supermaven (#14834) 2024-07-20 03:53:24 +03:00
install_cli Fix flickering (#9012) 2024-03-11 10:45:57 +01:00
journal Add the ability for extensions to provide language settings (#10296) 2024-04-08 19:17:12 -04:00
language lsp: Pass back diagnostic .data when querying code actions for it (#14962) 2024-07-22 17:49:11 +02:00
language_model Allow using a custom model when using zed.dev (#14933) 2024-07-22 12:25:53 +02:00
language_selector Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
language_tools Start on adding support for editing via the assistant panel (#14795) 2024-07-19 11:13:15 +02:00
languages go: Fix quoting of targeting expression for non-fish shells (#14821) 2024-07-19 18:05:31 +02:00
live_kit_client gpui: Update Menu name to use SharedString type to support more types (#14791) 2024-07-19 08:51:31 -04:00
live_kit_server Vendor LiveKit protocol (#11672) 2024-05-10 14:18:40 -04:00
lsp Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
markdown Avoid losing focus when block decorations go offscreen (#14815) 2024-07-19 17:04:18 +02:00
markdown_preview Simplify constructing tab content that is purely textual (#14695) 2024-07-17 20:11:05 -04:00
media Revert "Revert "Revert dependency updates in #9836 (#10089)"" 2024-04-02 13:12:38 -06:00
menu open picker (#14524) 2024-07-15 17:04:15 -06:00
multi_buffer Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
node_runtime http: Refactor construction of HTTP clients with a proxy (#14911) 2024-07-21 10:15:38 -04:00
notifications Remove never-used client parameter from message handler functions (#13406) 2024-06-22 16:07:36 -07:00
ollama Allow Ollama Model KeepAlive to be None, defaulting to indefinite (#13059) 2024-06-14 10:33:28 -07:00
open_ai Add gpt-4o-mini as an available model (#14770) 2024-07-18 22:32:56 -06:00
outline Add a way to filter items in the outline panel (#13984) 2024-07-09 16:44:24 +03:00
outline_panel Allow to input spaces in the outline panel filter input (#14951) 2024-07-22 12:02:25 +03:00
paths Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
picker open picker (#14524) 2024-07-15 17:04:15 -06:00
prettier Lookup prettier more leniently (#14403) 2024-07-13 21:59:14 +03:00
project lsp: Pass back diagnostic .data when querying code actions for it (#14962) 2024-07-22 17:49:11 +02:00
project_panel project_panel: Select the newly created file when copy/pasting a file (#14705) 2024-07-18 17:26:33 +03:00
project_symbols Start on adding support for editing via the assistant panel (#14795) 2024-07-19 11:13:15 +02:00
proto lsp: Pass back diagnostic .data when querying code actions for it (#14962) 2024-07-22 17:49:11 +02:00
quick_action_bar Allow an initial prompt to be associated with inline assist (#14816) 2024-07-19 17:13:48 +02:00
recent_projects Use -f in ssh remoting too (#14773) 2024-07-18 19:24:59 -06:00
refineable Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
release_channel auto-updates: Do not poll for updates on dev channel (#13311) 2024-06-20 15:00:54 +02:00
remote Fix usability issues with ssh connection modal (#14917) 2024-07-21 08:43:59 -07:00
remote_server Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
repl repl: Increase accuracy of error output line height (#14880) 2024-07-20 15:59:54 -07:00
rich_text New revision of the Assistant Panel (#10870) 2024-04-23 16:23:26 -07:00
rope Indent guides (#11503) 2024-05-23 15:50:59 +02:00
rpc Rank exact extension ID matches higher in search results (#14588) 2024-07-16 12:33:28 -06:00
search Use defaults for unchanged TextStyle fields (#14918) 2024-07-21 11:55:45 -04:00
semantic_index Extract completion provider crate (#14823) 2024-07-19 13:35:34 -04:00
semantic_version Extract SemanticVersion into its own crate (#9956) 2024-03-29 12:11:57 -04:00
settings Show an initial empty keymap (#14609) 2024-07-16 20:24:13 -06:00
snippet Correct escaping in snippets (#14912) 2024-07-22 00:57:34 +02:00
snippet_provider extensions: Add support for snippets provided by extensions (#14020) 2024-07-10 09:40:50 +02:00
sqlez Remove extraneous Cargo.lock files (#14001) 2024-07-09 12:15:34 -04:00
sqlez_macros Dynamicer builds (#13074) 2024-06-21 16:32:32 -07:00
story Introduce a new markdown crate (#11556) 2024-05-09 11:03:33 +02:00
storybook gpui: Update Menu name to use SharedString type to support more types (#14791) 2024-07-19 08:51:31 -04:00
sum_tree Introduce Editor::insert_flaps and Editor::remove_flaps (#12096) 2024-05-21 20:23:37 +02:00
supermaven Add Sign Out link for Supermaven (#14834) 2024-07-20 03:53:24 +03:00
supermaven_api paths: Replace lazy_static! with OnceLock (#13213) 2024-06-18 12:22:37 -04:00
tab_switcher Introduce recent files ambient context for assistant (#11791) 2024-05-14 13:48:36 +02:00
task task: Add re-run task button to terminal title (#12379) 2024-05-29 11:40:43 +02:00
tasks_ui Start on adding support for editing via the assistant panel (#14795) 2024-07-19 11:13:15 +02:00
telemetry_events Add metrics_id to editor_events (#13525) 2024-06-25 16:47:55 -04:00
terminal Revert hold: true for macOS tasks (#14376) 2024-07-13 04:02:38 +03:00
terminal_view Expand terminal menu actions (#14828) 2024-07-20 12:20:53 +03:00
text Start on adding support for editing via the assistant panel (#14795) 2024-07-19 11:13:15 +02:00
theme linux: Indicate when the window is focused (#14266) 2024-07-12 14:20:58 -07:00
theme_importer theme_importer: Output logs to stderr (#14890) 2024-07-21 08:53:37 -04:00
theme_selector Use UpdateGlobal accessors in more places (#11925) 2024-05-16 13:30:04 -04:00
time_format Inline git blame (#10398) 2024-04-15 14:21:52 +02:00
title_bar Fix context in command palette from application menu (#14599) 2024-07-16 15:14:18 -06:00
ui Fix typo in font-weight setting story (#14958) 2024-07-22 07:49:27 -04:00
ui_input Rename ui_text_field crate to ui_input (#13949) 2024-07-08 17:05:30 -04:00
util Associate logs from log_err with the calling crate (#13617) 2024-06-27 17:03:47 -07:00
vcs_menu Adjust list item & pickers spacing (#14250) 2024-07-15 10:23:18 -03:00
vim Refactor key dispatch (#14942) 2024-07-22 10:46:16 -06:00
welcome Start on adding support for editing via the assistant panel (#14795) 2024-07-19 11:13:15 +02:00
workspace Add command aliases (#14826) 2024-07-19 12:48:48 -06:00
worktree Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00
zed Fix usability issues with ssh connection modal (#14917) 2024-07-21 08:43:59 -07:00
zed_actions Add more menus to Zed (#12940) 2024-06-18 12:16:54 -07:00