Commit Graph
254 Commits
Author SHA1 Message Date
Max Brunsfeld fbd589b589 Start work on handling multibuffers properly when closing unsaved buffers 2022-05-22 16:48:33 -07:00
Max Brunsfeld b72d97ce78 Disable menu item key equivalents while there are pending keystrokes 2022-05-20 10:04:43 -07:00
Max Brunsfeld 21862faa58 Convert function keys to the correct macOS codes for menu items 2022-05-19 17:37:46 -07:00
Max Brunsfeld ea85473f4f Enable and disable application menu items based on the active view 2022-05-19 16:50:40 -07:00
Max Brunsfeld ef0b584532 Remove AppState from workspace actions
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Max Brunsfeld 7445197f4d Derive application menu key equivalents from the keymap 2022-05-19 10:04:01 -07:00
Antonio Scandurra 225536accc Merge branch 'main' into request-to-join-project 2022-05-17 14:55:20 +02:00
Antonio Scandurra e0c772db3e Hold a weak handle to Presenter when dispatching events
This ensures that the only strong reference to the presenter is held
by `App`. This is important because we want to call `flush_effects`
when removing a window and implicit drops of the `Presenter` would
make that hard.

Before this commit, if a rendered view contained strong handles to
views and models, we would only drop them on the next `flush_effects`.
This was manifesting itself in `Project`s not being released when
closing their containing window.
2022-05-17 13:04:38 +02:00
Nathan Sobo d821e7a4c1 Cancel join requests when the requester closes the window 2022-05-16 20:29:36 -06:00
Antonio Scandurra aa90c06012 Display a temporary window while remote project is loading 2022-05-16 17:45:50 +02:00
Nathan Sobo a620665bed Only synthesize mouse moves on scene construction if window is active 2022-05-13 14:05:13 -06:00
Max BrunsfeldandNathan Sobo be51a58311 Start work on requesting to join projects
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-12 17:53:11 -07:00
Antonio ScandurraandNathan Sobo 933a1f2cd6 Show badge when there are pending contact requests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-11 17:39:03 +02:00
Nathan SoboandAntonio Scandurra eef99f059d Make flex elements fill available space when they contain a float
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-10 06:14:30 -06:00
Antonio Scandurra 95d848fe1e Ensure flex_float works even when re-painting without layout
Previously, we were mutating the remaining space stored on the layout
state, which would cause re-paints to always have a `remaining_space`
of 0 and therefore not align `flex_float` elements to the right/bottom.
2022-05-06 10:20:03 +02:00
Max Brunsfeld 8445eaab85 Fix crash when emptying atlases
Previously, when an atlas was emptied, we would move it into a different
vector: free_atlases. This removal could cause existing atlas ids to
refer to the wrong atlases.
2022-05-05 17:52:47 -07:00
Antonio Scandurra 61346f734d WIP 2022-05-05 15:15:58 +02:00
Max BrunsfeldandNathan Sobo 657ea264cc Allow guests to create files from the project panel
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-04 10:28:44 -07:00
Antonio Scandurra 09a8b8e675 Capture crash reports and upload them the next time Zed launches 2022-05-02 15:17:43 +02:00
Antonio Scandurra 7ec5c04fdf Correctly alpha-blend border and background in quad SDF 2022-04-28 13:54:18 +02:00
Nathan SoboandMax Brunsfeld 1293b21b2d Get db tests passing with Tokio Postgres adaptor
We now run tests that interact with the real database under a Tokio reactor. We make the tests run multi-threaded so we can block on the main thread on database teardown and still make progress actually tearing down the DB.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-26 13:30:21 -06:00
Max Brunsfeld 065734e1de Merge pull request #898 from zed-industries/track-window-focus
Focus/blur views when application windows become active/inactive
2022-04-25 08:54:47 -07:00
Nathan Sobo ac6880b6ee Only set the cursor style once per mouse move event
This will hopefully prevent some of the intermittent flickering we seem to be seeing.
2022-04-22 18:57:49 -06:00
Max Brunsfeld e8d263274c Remove duplication between windowDid{Become,Resign}Key callbacks 2022-04-22 15:06:50 -07:00
Max Brunsfeld 6b9e93ac6d Fix double-borrow crash by calling window activated callback asynchronously 2022-04-22 15:01:19 -07:00
Max Brunsfeld 7f64076f8d Focus/blur views when application windows become active/inactive 2022-04-22 14:18:50 -07:00
Nathan SoboandAntonio Scandurra 92f040df00 Apply cursor styles during paint
This makes the editor's cursor an IBeam and properly deals with nested cursor styles.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-22 10:54:18 -06:00
Antonio Scandurra 3def7a6803 Avoid flicker when toggling project browser on workspace open 2022-04-22 11:53:45 +02:00
Max Brunsfeld 066b4faf61 Restructure KeyMap file, make it easy to edit in Zed
Add a JSON schema for this file so that autocomplete can be used for the actions.
2022-04-21 13:35:10 -07:00
Antonio Scandurra fb87bacc7e Merge branch 'main' into auto-update 2022-04-21 09:53:06 +02:00
Antonio ScandurraandNathan Sobo a210b05d00 Remove App::on_open_files, as it's a subset of on_open_urls
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:36:27 +02:00
Antonio Scandurra f7055c2acc Implement zed --wait 2022-04-20 17:28:31 +02:00
Max Brunsfeld fbd1afc51f Add a command for installing the CLI 2022-04-20 17:27:33 +02:00
Nathan SoboandMax Brunsfeld 75f0326e54 Use ipc_channel crate to communicate between cli and app
We still aren't handling CLI requests in the app, but this lays the foundation for bi-directional communication.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-20 17:15:46 +02:00
Antonio ScandurraandNathan Sobo 01eb2dce24 WIP: Start on a new cli crate
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:15:45 +02:00
c56e2ead23 Fix hang when dropping ::scoped future under deterministic executor
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-18 17:11:39 -07:00
Max BrunsfeldandKeith Simmons d0413ac0e1 Fix crash when dropping a task that is awaiting a call to Background::scoped
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-18 17:11:39 -07:00
Max BrunsfeldandAntonio Scandurra 3901d9d544 Display key bindings in the command palette
They still need to be styled.

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-04-18 17:11:08 -07:00
Max Brunsfeld 4630071f58 Start work on a command palette 2022-04-18 17:11:08 -07:00
Max Brunsfeld 99f8466cb5 Add a gpui method for listing the available actions 2022-04-18 17:11:07 -07:00
Antonio Scandurra 77d3cc359e Fix tests 2022-04-14 18:50:45 +02:00
Antonio Scandurra 5a8297a02f Introduce ViewContext::observe_focus 2022-04-14 18:22:55 +02:00
Nathan Sobo 27057fdb1b Only process a single focus effect per batch
This allows us to focus the query editor of the project search when deploying it. Previously, a complex interplay between focus events was preventing this from working in an intuitive way. What happened previously:

- We'd activate the project search, which enqueued a focus effect for the project search view
- We'd focus the query editor, which enqueued an effect
- We'd process the focus effect for the search view, which would enqueue an effect to transfer focus to the results editor
- We'd process the effect to focus the query editor
- We'd process the effect to focus the results editor

Now...

- We activate the project search pane item, enqueuing a focus effect for the project search itself
- We focus the query editor and *remove* the previous pending focus change effect
- We process the focus effect
2022-04-14 08:52:24 -06:00
Keith Simmons 4b55b578b2 Don't panic when allocating tiny_skia pixmap 2022-04-13 14:57:16 -07:00
Antonio ScandurraandNathan Sobo 8e89074714 Reduce allocations when caching fonts
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-13 19:06:34 +02:00
Antonio ScandurraandNathan Sobo cdcdccfb89 Render emojis
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-13 17:31:10 +02:00
Antonio Scandurra fff1d9c631 Implement glyph scaling in a way that works with emojis as well 2022-04-13 15:56:32 +02:00
Keith SimmonsandMax Brunsfeld 4249b5687e Implement font fallback in layout_line
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-04-13 11:42:19 +02:00
Antonio Scandurra 6cc9306f00 Make room for font subpixel variants correctly 2022-04-13 11:36:54 +02:00
Antonio Scandurra 6b629dfa5c Use CTFont::draw_glyphs to rasterize glyphs
This API supports rendering emojis in addition to normal glyphs.
2022-04-12 19:37:26 +02:00