Antonio Scandurra
e1ca8e81bb
Use an Arena to reuse allocations for listeners
2023-12-15 15:13:32 +01:00
Julia and Antonio Scandurra
cfc050e3fe
Fire focus handlers on draw to avoid timing with newly created item
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev >
2023-12-13 12:16:39 -05:00
Antonio Scandurra
385c830bef
Make each DispatchNode smaller by allocating more
2023-12-12 13:16:09 +01:00
Conrad Irwin
1e89092d62
MOAR TESTS
2023-12-11 15:06:33 -07:00
Conrad Irwin
d1805d8ada
First round of vim tests
2023-12-11 14:16:25 -07:00
Max Brunsfeld
fce0c1f4d0
Dedup actions in WindowContext::available_actions
2023-12-08 13:02:14 -08:00
Antonio Scandurra and Marshall
2aee3e3192
Make Node::context optional as well
...
This was an oversight in d09dfe0 .
Co-Authored-By: Marshall <marshall@zed.dev >
2023-12-06 18:02:45 +01:00
Piotr Osiewicz and Antonio
6549a9a091
Let WindowContext::dispatch_action handle global actions
...
Co-authored-by: Antonio <antonio@zed.dev >
2023-12-06 16:52:52 +01:00
Piotr Osiewicz
e9002ab10a
Merge branch 'main' into app-menus
2023-12-06 16:34:55 +01:00
Piotr Osiewicz and Antonio
d09dfe01f5
Wire up global actions
...
Added an ephemeral root node so that even if there's no window/focused handle we still have something to dispatch to.
Co-authored-by: Antonio <antonio@zed.dev >
2023-12-06 16:15:53 +01:00
Nathan Sobo
631e264e3c
Start on app menus
2023-12-05 13:17:59 -07:00
Conrad Irwin
79773178c8
I was soooo close
2023-12-04 21:37:47 +00:00
Conrad Irwin
2c2e5144c9
Fix context key matching
...
* You need to check all layers of the context stack
* When in command, the context should be based on where focus was (to
match `available_actions`.
2023-12-04 21:28:37 +00:00
Marshall Bowers
3627ff87f0
Ensure the candidate keybinding matches the correct context
2023-12-04 15:53:38 -05:00
Mikayla
4de2c0f7ef
Re-implement actions as derive macros instead of blanket impls
2023-11-16 17:32:02 -08:00
Antonio Scandurra and Nathan Sobo
1d04dc5dbf
Clear the state of keystroke matchers when focus changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2023-11-15 20:11:07 +01:00
Nathan Sobo
364e3e7de5
Merge remote-tracking branch 'origin/main' into element-types
2023-11-14 01:55:58 -07:00
Nathan Sobo
80014a28ea
No compile errors or warnings
2023-11-14 01:23:09 -07:00
Nathan Sobo
27fb381cca
Checkpoint
2023-11-14 01:15:48 -07:00
Conrad Irwin
25bc898807
Add KeyBindings to CommandPalette
2023-11-13 15:40:49 -07:00
Conrad Irwin
7e7b065535
Fix on_action on focusable
...
We were accidentally dropping the key context
2023-11-13 12:48:36 -07:00
Antonio Scandurra
348760556a
💄
2023-11-13 18:33:08 +01:00
Antonio Scandurra
a6c95ad331
Fix panic when querying available actions
2023-11-13 18:29:18 +01:00
Antonio Scandurra
45fef27aa1
Clear all the state when clearing KeyDispatcher
2023-11-13 15:31:35 +01:00
Antonio Scandurra
d0b5c654aa
Clear pending keystrokes when finding action
2023-11-13 14:48:08 +01:00
Antonio Scandurra
827b16bf5c
Capture node in dispatch tree even if it's not focusable
2023-11-13 14:42:16 +01:00
Antonio Scandurra and Thorsten
9c18253863
Register key and action listeners using Interactive::initialize
...
Co-Authored-By: Thorsten <mrnugget@gmail.com >
2023-11-13 11:37:57 +01:00
Nathan Sobo
7eaba8fabc
WIP
2023-11-10 14:47:45 -07:00