Commit Graph
4658 Commits
Author SHA1 Message Date
Antonio Scandurra 06033d7fa9 Introduce ViewContext::on_window_should_close
This is a new callback that can be used to interrupt closing the window
when the user has unsaved changes.
2022-06-23 11:43:19 +02:00
Antonio Scandurra ca8ddcdeec Set window's edited = true when there are unsaved changes 2022-06-23 10:59:50 +02:00
Antonio Scandurra a6262b97ff Merge pull request #1230 from zed-industries/wrap-panic
Fix panic when `Text` contained carriage returns
2022-06-23 10:28:01 +02:00
Antonio Scandurra 01349e1d42 Fix panic when Text contained carriage returns 2022-06-23 10:21:21 +02:00
Antonio Scandurra b715e521ce Merge pull request #1227 from zed-industries/maintain-keepalive-under-high-message-volume
Maintain keepalive under high message volume
2022-06-23 07:56:17 +02:00
Max Brunsfeld 4cb68b2966 Prioritize keepalive pings over incoming message handling in Peer 2022-06-22 14:44:05 -07:00
Max Brunsfeld 36f8c68099 Remove redundant run_until_parked call in Foreground::advance_clock 2022-06-22 14:43:21 -07:00
Max Brunsfeld a14b626927 Enable env log in peer tests 2022-06-22 14:42:20 -07:00
Max Brunsfeld c0a434fe27 Merge pull request #1225 from zed-industries/fix-randomized-test-failure
Don't wait for host's worktree updates if they disconnected
2022-06-22 11:01:25 -07:00
Antonio ScandurraandMax Brunsfeld 2d8ffbdfa2 Don't wait for host's worktree updates if they disconnected
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-22 19:45:55 +02:00
Antonio ScandurraandMax Brunsfeld 48ff443d10 Remove stray log statement when contacts are updated
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-22 19:40:52 +02:00
Antonio Scandurra 49addc9937 Merge pull request #1224 from zed-industries/forward-deadlock
Prevent deadlocks when two clients perform a request to each other
2022-06-22 19:04:07 +02:00
Antonio Scandurra f2d134917e Remove non-determinism from Peer caused by smol's timeout helper 2022-06-22 18:39:12 +02:00
Antonio Scandurra 071d940a88 Ensure receive timeout is triggered before waiting on disconnection 2022-06-22 18:02:42 +02:00
Antonio Scandurra 9b521d6097 Use Arc<Deterministic> to understand which await points are parking 2022-06-22 17:39:34 +02:00
Antonio Scandurra 62521531a6 💄 2022-06-22 15:06:22 +02:00
Antonio Scandurra fb2590d913 Use a FuturesUnordered to process foreground messages
This prevents deadlocks when e.g., client A performs a request to client B and
client B performs a request to client A. If both clients stop processing further
messages until their respective request completes, they won't have a chance to
respond to the other client's request and cause a deadlock.

This arrangement ensures we will attempt to process earlier messages first, but fall
back to processing messages arrived later in the spirit of making progress.
2022-06-22 15:04:17 +02:00
Antonio Scandurra 6eb3e72c36 Add test demonstrating hang when peers wait on each other's response 2022-06-22 14:41:14 +02:00
Antonio Scandurra f09a997d2d Merge pull request #1223 from zed-industries/update-metadata-when-worktrees-are-removed
Update project metadata when releasing a worktree's weak handle
2022-06-22 10:50:44 +02:00
Antonio Scandurra 2f09a4af16 Update project metadata when releasing a worktree's weak handle
When a project was getting unshared, we would remove invisible worktrees
from the project's state without notifying the server, which was causing
the randomized tests to fail.

This commit calls `Project::remove_worktree` when a worktree's handle gets
released. Doing so ensures that we update both our local metadata database
as well as the state on the server.
2022-06-22 10:26:10 +02:00
Keith Simmons 484e98c0bb Merge pull request #1216 from zed-industries/hover-context-menu-fix
Don't trigger hover popover action when mouse is over context menu
2022-06-21 13:43:24 -07:00
Keith Simmons 19feb627d8 Add comment linking to long term plan 2022-06-21 12:38:27 -07:00
Max Brunsfeld dc8d5f4ae3 Merge pull request #1217 from zed-industries/fix-lsp-statuses-for-guests
Report running language servers when sharing project for the first time
2022-06-21 11:50:58 -07:00
Antonio Scandurra 83f38aa1ba Merge pull request #1215 from zed-industries/suggest-upgrade-on-reconnect
Show upgrade required message when reconnecting after a protocol change
2022-06-21 20:41:36 +02:00
Antonio ScandurraandMax Brunsfeld 69aa3d848e Report running language servers when sharing project for the first time
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-21 20:39:54 +02:00
Max BrunsfeldandAntonio Scandurra e9d19457d6 Add failing test for replication of lsp statuses
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 11:27:08 -07:00
Keith Simmons 057a7ec989 Don't trigger hover popover action when mouse is over context menu 2022-06-21 11:23:25 -07:00
Antonio Scandurra a5ae8d9072 Merge pull request #1214 from zed-industries/fix-error-on-empty-worktree-update
Fix error when worktree has no file extensions
2022-06-21 20:08:20 +02:00
Max BrunsfeldandAntonio Scandurra 30d75620f1 Fix error when worktree has no file extensions
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 11:02:13 -07:00
Keith Simmons e88f115467 Merge pull request #1213 from zed-industries/hover-dismiss-fix
hide hover on editor blur
2022-06-21 10:47:52 -07:00
Keith Simmons fb881b2eda hide hover on editor blur 2022-06-21 10:37:59 -07:00
Max BrunsfeldandAntonio Scandurra 6a2c5e0dc1 Show upgrade required message when reconnecting after a protocol change
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 10:26:34 -07:00
Antonio Scandurra 69bd6bf1f3 Merge pull request #1212 from zed-industries/persist-project-activity
Add an API that returns the most active zed users and the projects where they've been active
2022-06-21 18:16:29 +02:00
Antonio Scandurra db77601aa2 Expose project metadata via GET /project_metadata 2022-06-21 18:06:31 +02:00
Antonio Scandurra ebaf3224fd Exclude staff from activity recording 2022-06-21 16:07:59 +02:00
Antonio Scandurra c90e8c08a6 Accept a datetime range when querying project activity 2022-06-21 14:03:10 +02:00
Antonio Scandurra 95a629d200 Unregister project from db when user disconnects or manually does so 2022-06-21 10:37:34 +02:00
Antonio Scandurra 7acebc4eb8 Register projects in the database and record worktree extensions 2022-06-21 10:29:26 +02:00
Max Brunsfeld 44160869eb Add an API that returns the most active users and the projects where they've been active 2022-06-20 19:46:37 -07:00
Antonio Scandurra bc3287e5d0 Merge pull request #1209 from zed-industries/mdx-highlighting
Highlight files ending in `mdx` as Markdown
2022-06-20 15:56:14 +02:00
Antonio Scandurra 0e20782b53 Highlight files ending in mdx as Markdown
This is clearly a stopgap solution but it'll make our life easier
while hacking on zed.dev.
2022-06-20 15:53:45 +02:00
Antonio Scandurra 041e230d24 Merge pull request #1208 from zed-industries/enhance-autoclose
Enhance auto-closing bracket behavior
2022-06-20 12:17:10 +02:00
Antonio Scandurra d425d9fa64 Allow wrapping selected text with ' in Rust 2022-06-20 11:56:46 +02:00
Antonio Scandurra 6040429f93 Auto-close ' for TypeScript and don't do so for Rust 2022-06-20 11:55:40 +02:00
Antonio Scandurra d5efae609e Respect close in language configuration when autoclosing bracket 2022-06-20 11:50:44 +02:00
Antonio Scandurra d6c630f8eb Add missing auto-close brackets from various languages 2022-06-20 11:38:12 +02:00
Antonio Scandurra 9cf1774ca8 Merge pull request #1207 from zed-industries/remove-folder-from-project
Replace "Remove Folder from Project" label with "Remove from Project`
2022-06-20 10:58:20 +02:00
Antonio Scandurra 137a3996a1 Replace "Remove Folder from Project" label with "Remove from Project` 2022-06-20 10:53:26 +02:00
Max Brunsfeld 4bb5a2f19e Merge pull request #1206 from zed-industries/fix-offline-project-leak
Fix project leak in contacts panel
2022-06-17 15:55:43 -07:00
Max Brunsfeld 71534d4412 Avoid holding a strong project handle in an on_click callback 2022-06-17 15:41:48 -07:00