Max Brunsfeld and Nathan Sobo
0becbe482a
Distinguish between singleton and non-singleton workspace items
...
* Prompt to save singleton items before non-singleton ones
* Don't prompt to save multi-buffers if they contain excerpts to items that are open elsewhere and not being closed.
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-05-23 16:03:00 -07:00
Max Brunsfeld
fbd589b589
Start work on handling multibuffers properly when closing unsaved buffers
2022-05-22 16:48:33 -07:00
Keith Simmons
45ea3d4c38
Review fixes
2022-05-13 15:55:27 -07:00
Keith Simmons
de9dc27980
store buffer and display_map model handles on selections collection
2022-05-13 15:55:27 -07:00
Keith Simmons
db0a9114c2
Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections
2022-05-13 15:55:27 -07:00
Keith Simmons
c9dcfff607
Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection
2022-05-13 15:55:17 -07:00
Max Brunsfeld
fa358c01cf
Add format_on_save setting
...
This lets you turn of formatting on save for specific languages.
2022-04-28 14:31:06 -07:00
Max Brunsfeld
37a3cead03
Merge pull request #921 from zed-industries/new-status-bar-design
...
Style the status bar according to the latest design
2022-04-28 12:42:25 -07:00
Max Brunsfeld
a3700e0dd8
Combine diagnostic status w/ diagnostic message indicators
...
Improve the indicator styling
2022-04-27 14:25:39 -07:00
Antonio Scandurra and Nathan Sobo
c9478cab09
Don't panic when navigation data contains invalid anchors and/or points
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-04-27 16:51:48 +02:00
Antonio Scandurra and Nathan Sobo
cde5a45318
Clip scroll_top_row before navigating back to it
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-04-27 16:25:26 +02:00
Keith Simmons
b893cb6d82
rename NavigationData anchor and offset to cursor_anchor and cursor_offset
2022-04-13 14:53:47 -07:00
Keith Simmons
f20e3f35a1
Record scroll position in nav history
2022-04-13 12:30:33 -07:00
Max Brunsfeld and Keith Simmons
866ffdd4ae
Move Settings to its own crate
...
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-06 10:23:33 -07:00
Antonio Scandurra
703f1c3be0
Introduce workspace::Item::reload to manually trigger a reload
2022-04-01 14:02:49 +02:00
Antonio Scandurra
2c78c830eb
Skip formatting during save if it takes too long
2022-03-28 11:02:20 +02:00
Antonio Scandurra
87981bb2ab
Emit an Edited event when ending, undoing or redoing a transaction
2022-03-24 08:56:37 +01:00
Antonio Scandurra
a739c362d9
Rename editor::Event::Edited to editor::Event::BufferEdited
...
This is to distinguish it from a new event we're about to add which
represent edits originating from that specific editor.
2022-03-24 08:55:46 +01:00
Max Brunsfeld
cbd4ef2ec5
Merge pull request #667 from zed-industries/fix-duplicate-nav-entries
...
Fix duplicate nav entries
2022-03-23 11:49:00 -07:00
Antonio Scandurra
5cd94b5b92
WIP
2022-03-23 19:05:46 +01:00
Max Brunsfeld and Nathan Sobo
0b3a63b843
Fix error in follower when leader creates pending selections
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-23 10:24:26 -07:00
Max Brunsfeld and Nathan Sobo
fa62fd968f
Autoscroll when leader moves cursors
...
instead of copying their scroll top.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-22 18:02:54 -07:00
Max Brunsfeld and Nathan Sobo
8699dd9c56
Replicate fractional component of leader's scroll position
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-22 17:20:13 -07:00
Max Brunsfeld and Nathan Sobo
4435d9b106
Combine updates from multiple view events when updating followers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-22 16:22:42 -07:00
Max Brunsfeld
fc811e0856
Don't represent editor's scroll top anchor as an option
...
Use Anchor::min as the special value representing a scroll top of zero
2022-03-22 13:32:25 -07:00
Antonio Scandurra
5dc36260e5
Reflect leader's view state when recycling existing local editors
2022-03-22 10:51:17 +01:00
Antonio Scandurra
3117554568
Automatically unfollow when editing, scrolling or changing selections
2022-03-22 09:17:01 +01:00
Max Brunsfeld
c550fc3f01
WIP - Start work on unfollowing automatically
2022-03-21 21:52:28 -07:00
Max Brunsfeld
1728551282
Always mirror the leader's selections when following
2022-03-21 21:47:29 -07:00
Max Brunsfeld and Antonio Scandurra
06cd9ac664
Match the leader's last selection when unfollowing
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-21 14:04:55 -07:00
Max Brunsfeld and Antonio Scandurra
3e0bc979c3
Avoid infinite loop when collaborators follow each other
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-21 11:47:00 -07:00
Antonio Scandurra
a2dbebd9ba
Hide cursor both locally and remotely when following
2022-03-21 15:16:56 +01:00
Antonio Scandurra
0e920ad5e9
Unset follower's scroll anchor when editor is scrolled all the way up
2022-03-19 10:50:23 +01:00
Max Brunsfeld
570c987455
Handle view updates when following
...
Basic following now works. Editors' scroll positions
are their only replicated view state.
2022-03-18 15:56:57 -07:00
Max Brunsfeld
d860ed25c1
Allow FollowableItem::to_state_message to return None
...
This way, we can avoid a panic if we don't handle certain cases,
like a non-singleton editor.
2022-03-18 13:36:05 -07:00
Max Brunsfeld and Antonio Scandurra
d02ab9bd06
Start work on updating editors's scroll positions when following
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-18 12:56:20 -07:00
Antonio Scandurra
f4520d4184
WIP
2022-03-18 18:07:03 +01:00
Antonio Scandurra
7d7e10598a
Broadcast active view to followers
2022-03-18 16:00:03 +01:00
Antonio Scandurra
10e6d82c3e
WIP: Start on sending view updates to followers
2022-03-18 14:20:09 +01:00
Antonio Scandurra
f0b7bd6e17
Serialize initial follow state in leader and reflect it in follower
2022-03-18 10:22:13 +01:00
Max Brunsfeld
0fdaa1d715
WIP
2022-03-17 17:53:49 -07:00
Max Brunsfeld and Antonio Scandurra
845457e2c4
Always read project entry id from workspace::Item
...
We cannot store a workspace item's project entry id separately,
since buffers' entry ids can change (for example when doing
a *save as*).
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-17 10:58:20 -07:00
Antonio Scandurra and Nathan Sobo
bff414cfbc
Remove Editor::find_or_create
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 15:13:47 +01:00
Antonio Scandurra and Nathan Sobo
44d997c00c
Rename app_state to global in gpui
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 14:33:01 +01:00
Antonio Scandurra
a691c2fbdb
Delete unused code
2022-03-17 11:33:58 +01:00
Antonio Scandurra
0efce8f70a
Rename ItemView to Item
2022-03-17 11:32:46 +01:00
Antonio Scandurra
aced1e2315
Finish refactoring of how editors are opened
2022-03-17 11:29:46 +01:00
Nathan Sobo and Max Brunsfeld
728c708150
WIP: Massage opening of editors
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-03-16 17:40:09 -06:00
0036e5c86c
Replace ProjectEntry struct with ProjectEntryId
...
Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Keith Simmons <keith@the-simmons.net >
2022-03-16 15:59:47 -06:00
a88320dc5f
Remove workspace::Item trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Keith Simmons <keith@zed.dev >
Co-Authored-By: Antonio Scandurra <antonio@zed.dev >
2022-03-16 13:34:06 -07:00