Commit Graph
269 Commits
Author SHA1 Message Date
Keith Simmons c14f4e835d Merge pull request #1019 from zed-industries/vim-visual-line-mode
Vim visual line mode
2022-05-27 11:22:56 -07:00
Max Brunsfeld 14cdd73231 Add an API for setting a window's title
This controls how the window appears in the Window menu.
2022-05-27 10:45:55 -07:00
Keith Simmons f053c479e9 Visual line mode handles soft wraps 2022-05-26 17:02:05 -07:00
Antonio Scandurra ce06f5ef2a Pretty-print JSON of server snapshot 2022-05-26 09:34:39 +02:00
Max Brunsfeld 259d76aa40 Start work on handling multibuffers properly when closing unsaved buffers 2022-05-22 16:48:33 -07:00
Max Brunsfeld d1dc5d73f9 Disable menu item key equivalents while there are pending keystrokes 2022-05-20 10:04:43 -07:00
Max Brunsfeld 09dde247f2 Convert function keys to the correct macOS codes for menu items 2022-05-19 17:37:46 -07:00
Max Brunsfeld 135cef12b6 Enable and disable application menu items based on the active view 2022-05-19 16:50:40 -07:00
Max Brunsfeld e6011794ca 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 d483d1100d Derive application menu key equivalents from the keymap 2022-05-19 10:04:01 -07:00
Antonio Scandurra 32b92599e6 Merge branch 'main' into request-to-join-project 2022-05-17 14:55:20 +02:00
Antonio Scandurra 70d91a0cff 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 6be7161888 Cancel join requests when the requester closes the window 2022-05-16 20:29:36 -06:00
Antonio Scandurra 5509d7192e Display a temporary window while remote project is loading 2022-05-16 17:45:50 +02:00
Nathan Sobo f754614157 Only synthesize mouse moves on scene construction if window is active 2022-05-13 14:05:13 -06:00
Max BrunsfeldandNathan Sobo 8d00fab9b1 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 0aa63af210 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 df90c774da 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 c2f00e7d61 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 c10c6ccea1 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 58367fccfb WIP 2022-05-05 15:15:58 +02:00
Max BrunsfeldandNathan Sobo 8b64406938 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 fdd3da71f9 Capture crash reports and upload them the next time Zed launches 2022-05-02 15:17:43 +02:00
Antonio Scandurra 854d88596a Merge pull request #940 from zed-industries/telemetry
Instrument the collab server with OpenTelemetry collecting into Honeycomb.io
2022-04-29 17:50:55 +02:00
Antonio Scandurra b31b33d274 Correctly alpha-blend border and background in quad SDF 2022-04-28 13:54:18 +02:00
Nathan SoboandAntonio Scandurra 99a9c1aecb Send telemetry to Honeycomb via GRPC
We updated the core-foundation crates because Tonic (the GRPC crate) relies on a newer version of core foundation to find TLS root certificates.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-27 09:58:55 -06:00
Nathan SoboandMax Brunsfeld f7ce2932e6 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 2a221ebf0b 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 d643955766 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 aca8227e7d Remove duplication between windowDid{Become,Resign}Key callbacks 2022-04-22 15:06:50 -07:00
Max Brunsfeld 22dcaf31e6 Fix double-borrow crash by calling window activated callback asynchronously 2022-04-22 15:01:19 -07:00
Max Brunsfeld 71e5de753f Focus/blur views when application windows become active/inactive 2022-04-22 14:18:50 -07:00
Nathan SoboandAntonio Scandurra 73c0d58830 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 4afa8c8931 Avoid flicker when toggling project browser on workspace open 2022-04-22 11:53:45 +02:00
Max Brunsfeld 20903e9130 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 372f2fc6a6 Merge branch 'main' into auto-update 2022-04-21 09:53:06 +02:00
Antonio ScandurraandNathan Sobo ef015a350e 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 6350760340 Implement zed --wait 2022-04-20 17:28:31 +02:00
Max Brunsfeld e7aa8350fd Add a command for installing the CLI 2022-04-20 17:27:33 +02:00
Nathan SoboandMax Brunsfeld b7f0ff4dca 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 a49363b39e WIP: Start on a new cli crate
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:15:45 +02:00
5b4f7a0f6c 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 c428098b2e 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 f573a7f164 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 700c1b2d50 Start work on a command palette 2022-04-18 17:11:08 -07:00
Max Brunsfeld d54db9b4ae Add a gpui method for listing the available actions 2022-04-18 17:11:07 -07:00
Antonio Scandurra 53944f3971 Fix tests 2022-04-14 18:50:45 +02:00
Antonio Scandurra 5294b328d3 Introduce ViewContext::observe_focus 2022-04-14 18:22:55 +02:00
Nathan Sobo e221fb61ac 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 f8bebdfb30 Don't panic when allocating tiny_skia pixmap 2022-04-13 14:57:16 -07:00