Commit Graph
6118 Commits
Author SHA1 Message Date
Mikayla Maki 89af803565 Rearrange the state machine 2023-05-04 13:45:31 -07:00
Julia eacea55aaf Fixup cases using buffer model handle id as buffer id 2023-05-04 12:32:31 -04:00
JuliaandAntonio Scandurra 1883e260ce Offload text::Buffer construction to background worker
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-04 12:32:31 -04:00
JuliaandAntonio Scandurra 7e06062bdb Store history base text as rope
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-04 12:32:31 -04:00
Antonio Scandurra 64e0c16baa Use Workspace::toggle_sidebar_item when clicking on sidebar button
Previously, we were mistakenly using `Sidebar::toggle_item`, which only
performs part of the toggle operation.
2023-05-04 17:06:37 +02:00
Antonio Scandurra 912a4cf549 Avoid calling update_window twice in blurred event handler
This was preventing us from unhooking vim when performing a rename,
which prevented typing in the rename editor.
2023-05-04 16:18:01 +02:00
Antonio Scandurra 0f93714d4f Merge pull request #2442 from zed-industries/filter-vim-commands
Filter out vim commands when vim mode is disabled
2023-05-04 15:00:19 +02:00
Antonio Scandurra b3baebde22 Filter out vim commands when vim mode is disabled 2023-05-04 14:52:34 +02:00
Antonio Scandurra 121264d35a Fix panic when opening multiple definitions in a multibuffer
The editor is on the stack, so adding an item to the `Pane` containing
the editor will cause a double borrow and a consequent panic. This
commit fixes the issue by deferring the opening of the definitions.
2023-05-04 14:34:42 +02:00
Antonio Scandurra 5cc6304fa6 Verify keystrokes can be queried while views are on the stack 2023-05-04 12:09:32 +02:00
Antonio Scandurra 3d679ddb26 Avoid re-allocating KeymapContext after every view notification 2023-05-04 12:04:30 +02:00
Antonio Scandurra 18e39ef2fa Cache view's type id and keymap context into a separate map
During `layout`, we now pass a mutable reference to the element's
parent view. This is a recursive process that causes the view to
be removed from `AppContext` and then re-inserted back into it once
the layout is complete.

As such, querying parent views during `layout` does not work as such
views will have been removed from `AppContext` and not yet re-inserted
into it. This caused a bug in `KeystrokeLabel`, which used the `keystrokes_for_action`
method to query its ancestors to determine their type id and keymap context.

Now, any time a view notifies, we will cache its keymap context so that
we don't need to query the parent view during `layout`.
2023-05-04 10:47:56 +02:00
Joseph Lyons 053b34875b collab 0.11.0 2023-05-03 14:59:04 -04:00
Joseph Lyons 653ea3a85d v0.86.x dev 2023-05-03 14:38:41 -04:00
Max Brunsfeld 9d41f83b1b Merge branch 'main' into copilot-disabled-globs 2023-05-03 10:53:28 -07:00
Max Brunsfeld 8eb1312deb Add copilot menu item for enabling paths by glob 2023-05-03 10:14:01 -07:00
Antonio Scandurra 376aa1235f Fix "IncomingCallNotification was dropped" error when accepting a call
This was caused by accepting the call, which caused the notification to
be removed. When `active_call.accept_incoming()` finally completed, we
would try to get the app state from it in order to join the project, but
couldn't becuase the view would have already been dropped.

This commit fixes the bug by capturing a weak handle to the app state
when accepting the call as opposed to trying to read it from the view
when the accept completes.
2023-05-03 10:37:57 +02:00
Antonio Scandurra c3cf9e3185 Merge pull request #2436 from zed-industries/close-window-end-call
Move methods querying window state into `AsyncAppContext`
2023-05-03 10:27:05 +02:00
Joseph Lyons 41d4454f45 Use post_json so that the Content-Type is set to application/json 2023-05-02 23:23:43 -04:00
Joseph Lyons 69a4fffae2 Update post_json to take in a bool for allowing for redirects 2023-05-02 23:22:55 -04:00
Joseph Lyons 2b95aba99c Add download and upload metadata to update request 2023-05-02 17:16:42 -04:00
Kirill BulatovandAntonio Scandurra 1398a12062 More keybindings in macOs modals with buttons
Closes https://github.com/zed-industries/community/issues/1095
by forcing the non-Cancel button to get a focus.
Due to the way macOs handles buttons on modals, the focus gain had to be
achieved via certain button addition order, rather than conventional
"setFocus"-ish API, see the related comment for details.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-05-02 21:10:20 +03:00
Antonio Scandurra 70f8cf4cf6 Move methods querying window state into AsyncAppContext 2023-05-02 19:38:48 +02:00
Julia 4f6939732e Merge pull request #2432 from zed-industries/more-diagnostic-source
Show diagnostic source in more places
2023-05-02 09:16:11 -04:00
Julia 185c1650df Show diagnostic source in inline diagnostic 2023-05-02 09:08:07 -04:00
Antonio Scandurra 94f1775533 Fix broken styling in contact finder
This regressed as part of #2372, where we forgot to theme the contact
finder picker differently from the rest of the app.
2023-05-02 13:46:49 +02:00
Antonio Scandurra f985fac6f9 Fix panic when showing contacts popover via keybinding 2023-05-02 11:47:05 +02:00
Antonio Scandurra 794446bf8b Move debug_elements to AsyncAppContext
Previously, `debug_elements` was available on `WindowContext`. If that
method was called while having a borrow out to a view, it would panic because
the view would already have been borrowed.

By moving it to an `AsyncAppContext` we ensure the method can't be called while
a view is being used.
2023-05-02 11:09:40 +02:00
Antonio Scandurra 4c1cba6def Remove unnecessary Element impl for RootElement 2023-05-02 10:09:57 +02:00
Julia f7de0ad8ae Show diagnostic source in diagnostic multibuffer headers 2023-05-01 16:48:27 -04:00
Max Brunsfeld c485fc86a2 Add copilot.disabled_globs setting 2023-05-01 13:45:47 -07:00
Joseph T. Lyons f62ba2eec7 use installation_id over device_id 2023-05-01 16:29:51 -04:00
Julia 4966a4a681 Reduce hardcoded ESLint workspace configuration 2023-05-01 13:14:35 -04:00
Antonio Scandurra 780ece551e Defer hiding the dock and going back/forward when Pane is on the stack 2023-05-01 17:06:05 +02:00
Antonio Scandurra e3b2407ebf Run until parked now that the command palette spawns to dispatch action 2023-05-01 16:58:07 +02:00
Antonio Scandurra 6c931ab9da Inline test-only AppContext methods 2023-05-01 16:49:17 +02:00
Antonio Scandurra eb2cce98a7 Move dispatch_action_any_action_at to AsyncAppContext 2023-05-01 16:40:57 +02:00
Antonio Scandurra c4472b0786 Remove ViewContext::dispatch_action 2023-05-01 16:27:36 +02:00
Antonio Scandurra d815fc88ae Remove ViewContext::dispatch_any_action 2023-05-01 14:24:00 +02:00
Antonio Scandurra 029538fe21 Make dispatch_global_action private 2023-05-01 11:45:35 +02:00
Antonio Scandurra e566929d9e Fix panic when clicking on a definition
This was introduced with #2420 and was caused by re-entrantly updating
the workspace. Instead of passing the workspace reference from the outside,
we now define the definition navigation as a method on the editor which solves
the issue.

Note that we also needed to introduce a `defer` call when navigating to a definition
to prevent the workspace from reading the editor during `open_project_item`.
2023-04-29 14:53:17 +02:00
Joseph T. Lyons ae5794d911 Merge pull request #2421 from zed-industries/metrics-2
Rework telemetry code to support sending events to Clickhouse
2023-04-28 17:16:33 -04:00
Julia 1bf85214a4 Source ESLint server from Github rather than 3rd party NPM package 2023-04-28 16:42:36 -04:00
Joseph LyonsandMax Brunsfeld 6b0faa2d9c Rework telemetry code to support sending events to Clickhouse
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-04-28 16:06:55 -04:00
Antonio Scandurra 106ebeb386 Remove obsolete presenter modules 2023-04-28 17:37:25 +02:00
Antonio Scandurra 489b1f6a63 Merge remote-tracking branch 'origin/main' into simplify-action-dispatch 2023-04-28 17:31:12 +02:00
Antonio Scandurra 1c5376a560 Remove impl_internal_actions macro 2023-04-28 17:29:57 +02:00
Antonio Scandurra 1d41a703ad Remove internal actions from terminal_button 2023-04-28 17:29:17 +02:00
Antonio Scandurra 33da9e5690 Remove internal actions from project_panel 2023-04-28 17:21:10 +02:00
Antonio Scandurra e1535735b8 Remove DeployContextMenu internal action 2023-04-28 16:51:01 +02:00