Commit Graph

108 Commits

Author SHA1 Message Date
Antonio Scandurra
514d69e83d Merge branch 'main' into rename 2022-02-18 09:11:05 +01:00
Max Brunsfeld
10580f96a3 Automatically include current view id in element state ids 2022-02-17 13:44:46 -08:00
Max Brunsfeld
6d8db5f6bb Convert some project tests to use FakeFs
Also, tweak some FakeFs methods to make them slightly more convenient.
2022-02-17 11:09:27 -08:00
Max Brunsfeld
d173e4ef3c Fix non-unique ids passed to MouseEventHandlers
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-02-17 09:44:02 -08:00
Antonio Scandurra
809b843ceb Render "Sign in" label only for current user 2022-02-15 09:17:32 +01:00
Antonio Scandurra
2fcdcac080 Fetch code actions on cursor movement instead of on-demand
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-11 14:41:19 +01:00
Antonio Scandurra
4929b8c525 Move Buffer::format to Project::format 2022-02-11 12:07:46 +01:00
Max Brunsfeld
b67be5ded3 Add MultiBufferItemHandle
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-09 17:09:03 -08:00
Antonio Scandurra
7db4cad9e0 Fix panic when closing pane's last item 2022-01-31 10:10:15 +01:00
Antonio Scandurra
611538f6bd Clear highlighted matches when dismissing FindBar 2022-01-31 09:58:03 +01:00
Nathan Sobo
b1639e5677 Add cmd-g and cmd-shift-g to jump to next / previous result
I added the action handler on Pane so we can use these bindings when the find bar isn't focused.
2022-01-30 20:59:20 -07:00
Max Brunsfeld
4f0ffdcdaf Avoid panic when closing the last tab in a pane, due to calling activate_item 2022-01-27 15:38:10 -08:00
Max Brunsfeld
05e20ca72b Inform toolbars when active item changes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-27 13:00:23 -08:00
Antonio Scandurra
bebde782fa Deploy FindBar when hitting cmd-f
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-27 17:56:50 +01:00
Antonio Scandurra
e7d4c385d5 Take an Into<AnyViewHandle> in ChildView::new
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-27 17:54:45 +01:00
Max Brunsfeld
c9b4bb78f2 Merge branch 'project-diagnostics-pinned-tab' into style-project-diagnostics 2022-01-25 12:20:37 -08:00
Max Brunsfeld
0cfb9ff1ae Add random delays in FakeFs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-24 16:50:38 -08:00
Antonio Scandurra
31dfd01fda Make add_local_worktree private and use find_or_create_local_worktree
The former always adds a worktree, even if we have one already in the
project and that could be misused. The public API should always search
for a local worktree containing the requested path first so that the
project can uphold invariants about which worktrees it has.
2022-01-22 11:23:00 +01:00
Nathan Sobo
19751e9200 Merge remote-tracking branch 'origin/main' into go-to-definition 2022-01-21 11:12:38 -07:00
Nathan Sobo
a73671e57c Revert "Replace project_path with project_entry in workspace::{Item, ItemView}"
This reverts commit 9c9a09cccb.
2022-01-21 11:07:10 -07:00
Antonio Scandurra
6e7e86e491 Remove weak worktrees from project when nobody references them
Also, avoid showing them in the project panel as well as in the
contacts panel.
2022-01-21 14:34:14 +01:00
Nathan Sobo
fbca28337a When opening a path in an existing window, move it to the foreground 2022-01-20 20:45:30 -07:00
Antonio Scandurra
377e41a90f Make navigation history work with project diagnostics
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-20 18:21:48 +01:00
Antonio Scandurra
c450945001 WIP 2022-01-20 18:11:37 +01:00
Antonio Scandurra
b6685a532c Make "go to definition" work in project diagnostics
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-20 17:30:30 +01:00
Antonio Scandurra
cbbf7391e8 Start on Project::definition that only works locally (for now) 2022-01-20 12:11:41 +01:00
Antonio Scandurra
71082d4cdc Return a Task<Result<()>> in {ItemView,Buffer,MultiBuffer}::save 2022-01-20 09:58:24 +01:00
Antonio Scandurra
634340dd84 Return a task from Workspace::save_active_item
This required changing our approach to OS prompts and this commit greatly
simplifies that. We now avoid passing a callback and return a simple future
instead. This lets callers spawn tasks to handle those futures.
2022-01-20 09:51:29 +01:00
Max Brunsfeld
0992132a0d Always open buffers via the project 2022-01-19 14:48:54 -08:00
Antonio Scandurra
ae284c2d8a Route save_as via the Project
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-19 18:44:48 +01:00
Antonio Scandurra
9c9a09cccb Replace project_path with project_entry in workspace::{Item, ItemView} 2022-01-19 15:56:04 +01:00
Antonio Scandurra
18f1040c85 Rename Navigation to NavHistory 2022-01-19 15:27:34 +01:00
Max Brunsfeld
2cae706033 Limit the storage used by the navigation history 2022-01-18 16:31:48 -08:00
Max Brunsfeld
926306582b Add a unit test for navigation behavior at the editor level 2022-01-18 16:25:22 -08:00
Max Brunsfeld
f7326b8d74 Push to navigation history based on jump distance instead of time 2022-01-18 15:02:49 -08:00
Antonio Scandurra
16b82d59f1 Experiment with a more general way of pushing editor navigation entries 2022-01-18 18:03:10 +01:00
Antonio Scandurra
0cae3e0ac0 Ensure focus is transferred when opening the first item in pane 2022-01-18 10:15:37 +01:00
Antonio Scandurra
b7091dd5e2 Fix double borrow error when closing an item 2022-01-18 10:13:50 +01:00
Antonio Scandurra
4f472e1442 🔥 2022-01-18 10:10:16 +01:00
Antonio Scandurra
d480738cc5 Skip past entries in the navigation history that can't be re-opened 2022-01-18 09:58:40 +01:00
Max Brunsfeld
11b7270f68 Navigate to previous positions in editors when using navigation history 2022-01-17 16:01:52 -08:00
Max Brunsfeld
e43d33cdad WIP - Reopen closed items when going back in nav history 2022-01-17 10:46:47 -08:00
Antonio Scandurra
ea624c6cde Populate backward/forward stacks upon item deactivation
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-17 18:57:31 +01:00
Antonio Scandurra
bbf634f439 Start laying the foundation for a per-pane navigation system 2022-01-17 16:59:06 +01:00
Antonio Scandurra
cd0d1d3340 Delete unused pane::State struct 2022-01-17 15:27:54 +01:00
Max Brunsfeld
b7561c6cef Add select_first and select_last bindings to outline view
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-14 10:45:37 -08:00
Max Brunsfeld
ed88fdcea2 Add unit test for diagnostic + path header ordering 2022-01-12 11:34:57 -08:00
Max Brunsfeld
6865a42df9 Show error+warning counts in project diagnostics tab
Allow workspace items' tab contents to be arbitrary elements

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 10:51:28 -08:00
Max Brunsfeld
a0a558318c In diagnostics editor, attempt to open excerpts in a different pane
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-10 16:33:25 -08:00
Max Brunsfeld
c7eb6a6a60 Tweak color of share icon in titlebar 2022-01-10 11:26:07 -08:00