Commit Graph
30 Commits
Author SHA1 Message Date
Piotr Osiewicz f4d7b3e3b1 chore: Bump Rust version to 1.76 (#7592)
Release Notes:

- N/A
2024-02-09 10:45:39 +02:00
Antonio Scandurra 55129d4d6c Revert "Use Fx* variants of HashMap and HashSet everywhere in Zed" (#7492)
Reverts zed-industries/zed#7481

This would regress performance because we'd be using the standard
library's hash maps everywhere, so reverting for now.
2024-02-07 13:16:22 +01:00
Kirill Bulatov eb236302c2 Use Fx* variants of HashMap and HashSet everywhere in Zed (#7481)
Release Notes:

- N/A
2024-02-07 09:45:37 +02:00
583ce44359 Fix cmd+k in terminal and fix sporadic keybind misses (#7388)
This fixes `cmd+k` in the terminal taking 1s to have an effect. It is
now immediate.

It also fixes #7270 by ensuring that we don't set a bad state when
matching keybindings.

It matches keybindings per context and if it finds a match on a lower
context it doesn't keep pending keystrokes. If it finds two matches on
the same context level, requiring more keystrokes, then it waits.



Release Notes:

- Fixed `cmd-k` in terminal taking 1s to have an effect. Also fixed
sporadic non-matching of keybindings if there are overlapping
keybindings.
([#7270](https://github.com/zed-industries/zed/issues/7270)).

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-05 10:55:27 -07:00
Conrad Irwin 61dfec2b75 Add keymatch modes so terminal can have cmd-k (#4219)
This isn't my favorite idea of a fix, but it does work for now, and it
seems likely the terminal will need to configure other aspects of action
dispatch in the future.

In the future we should explore making it possible to do this via the
keymap, either by making disabling bindings more robust; or by having a
way to indicate immediate mode per binding.

Release Notes:

- Fixed a bug where cmd-k in terminal took 1s
2024-01-23 10:23:45 -07:00
Conrad Irwin 056da0a0f1 Add keymatch modes so terminal can have cmd-k
This isn't my favorite idea of a fix, but it does work for now, and it
seems likely the terminal will need to configure other aspects of action
dispatch in the future.

In the future we should explore making it possible to do this via the
keymap, either by making disabling bindings more robust; or by having a
way to indicate immediate mode per binding.
2024-01-23 09:37:44 -07:00
Mikayla 1f94463ce2 Switch Arc<Mutex<Keymap>> to Rc<RefCell<Keymap>>, a relic of the GPUI2 port.
Make gpui pass clippy
2024-01-22 19:30:38 -08:00
Conrad Irwin c49477746e TYPO 2024-01-22 09:56:59 -07:00
Conrad Irwin 0903d29ab3 Improve logic for reused bindings, add docs. 2024-01-22 09:53:04 -07:00
Conrad Irwin c5d7c8e122 Fix cmd-k left 2024-01-22 08:38:20 -07:00
Conrad Irwin b9c7bafc80 Merge remote-tracking branch 'origin/main' into jk 2024-01-21 22:03:54 -07:00
Conrad Irwin 4143d3a36e Work on tests 2024-01-21 22:00:35 -07:00
Mikayla df4566fd1e Refactor out element context from GPUI 2024-01-21 19:43:35 -08:00
Conrad Irwin 9d261cf859 Merge branch 'main' into jk 2024-01-21 20:36:18 -07:00
Conrad Irwin b06e2eb6af Update handling of 'pending' keys
Before this change if you had a matching binding and a pending key,
the matching binding happened unconditionally.

Now we will wait a second before triggering that binding to give you
time to complete the action.
2024-01-21 20:12:01 -07:00
Mikayla aa57a4cfbc Document / lockdown more of GPUI 2024-01-21 14:26:45 -08:00
Conrad Irwin b8ed83a452 Refactor key dispatch to work in terms of bindings 2024-01-21 12:27:26 -07:00
69bbcba99a Preserve tooltips requested by cached views
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Max <max@zed.dev>
2024-01-15 19:19:27 +01:00
Antonio Scandurra d088ace404 Explicitly push a node in the dispatch tree when painting a new view 2024-01-11 12:48:05 +01:00
Antonio Scandurra 1c260e6dfd Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/copilot/src/sign_in.rs
#	crates/gpui/src/window.rs
#	crates/workspace/src/pane_group.rs
2024-01-10 22:58:52 +01:00
Antonio Scandurra d0c101cb6e Reuse depth map entries and retain element states for cached trees 2024-01-10 15:00:40 +01:00
Antonio Scandurra 881c532256 Insert primitives associated with views from a previous scene 2024-01-10 10:50:16 +01:00
Mikayla 1728c4eacc Fixed test 2024-01-09 11:52:03 -08:00
Antonio Scandurra 3bb29acd26 💄 2024-01-09 17:34:57 +01:00
Antonio Scandurra 84b05d6c05 Maintain view stack as part of DispatchTree 2024-01-09 15:12:23 +01:00
Antonio Scandurra f55870f378 Reuse mouse and keyboard listeners when reusing geometry for a view 2024-01-09 12:37:24 +01:00
Mikayla 27d4d727c3 Attempt to write test 2024-01-08 18:21:54 -08:00
Mikayla 0684369734 Fix off by 1 error when computing available key bindings 2024-01-08 17:30:24 -08:00
Max Brunsfeld 8a96562adf Handle contexts correctly for disabled key bindings 2024-01-05 13:06:59 -08:00
Max BrunsfeldandMikayla f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00