Max Brunsfeld
c105802b2d
Allow customizing the pane's following border width in the theme
2022-03-22 13:32:25 -07:00
Max Brunsfeld
4ed8f6fbb4
Make UpdateBuffer a foreground message
2022-03-22 13:32:25 -07:00
Keith Simmons
df751867a1
Remove results from movement function return values, and move editor test utilities to test file
2022-03-22 10:55:03 -07:00
Max Brunsfeld
ec7bada586
Merge pull request #651 from zed-industries/refine-word-movement
...
Add sub-word movement and helper functions for finding word boundaries
2022-03-22 09:09:03 -07:00
Antonio Scandurra
c78bcf7116
Ensure leader updates don't change the active pane of followers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:44:59 +01:00
Antonio Scandurra
9885c4f6ba
Don't trigger observations with notifications emitted prior to observing
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:28:11 +01:00
Antonio Scandurra
5ecf945e28
Don't trigger global subscriptions with events emitted prior to subscribing
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:14:21 +01:00
Antonio Scandurra
73eae287a1
Don't trigger subscriptions with events emitted prior to subscribing
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 15:57:30 +01:00
Antonio Scandurra
284a446be7
WIP
2022-03-22 13:35:37 +01:00
Antonio Scandurra
381c82714b
Bump protocol version
2022-03-22 13:19:07 +01:00
Antonio Scandurra
016fb01ef8
Merge branch 'main' into follow
2022-03-22 11:20:55 +01:00
Antonio Scandurra
e5a99cf8cd
Stop following when leader disconnects
2022-03-22 11:16:04 +01:00
Antonio Scandurra
ffaf409a31
Forget last pane's leader when such pane is removed
...
This is just a memory optimization and doesn't cause any observable
change in behavior.
2022-03-22 11:06:52 +01:00
Antonio Scandurra
5dc36260e5
Reflect leader's view state when recycling existing local editors
2022-03-22 10:51:17 +01:00
Antonio Scandurra
34e5a1f6bb
Always render local selections on top of remote ones
2022-03-22 10:31:28 +01:00
Antonio Scandurra
7d566ce455
Follow last collaborator or the next one via cmd-alt-shift-f
2022-03-22 10:16:58 +01:00
Antonio Scandurra
67dbc3117d
Stop following when activating a different item on the follower pane
2022-03-22 09:42:37 +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
Nathan Sobo
ee3e6049a3
Make boundary-finding methods wrap across newlines
...
This requires word and subword methods to explicitly acknowledge that they want to stop at newlines, which I think actually increases clarity. It makes the boundary finding method more general and useful for external callers such as the forthcoming vim crate.
2022-03-21 21:25:02 -06:00
Nathan Sobo
f70f4c7729
Improve DisplayPoint Debug impl
2022-03-21 21:07:56 -06:00
Nathan Sobo
e5a00d72f8
Implement next_subword_end
2022-03-21 20:02:08 -06:00
Nathan Sobo
c0d05c82b7
WIP: Start on previous_subword_start
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-21 19:53:01 -06:00
Max Brunsfeld
c8f36af823
Show borders around avatars and panes to indicate following state
2022-03-21 15:12:15 -07:00
Nathan Sobo
5b54874705
Extract logic for scanning over character boundaries
2022-03-21 16:01:22 -06:00
Nathan Sobo
0c89ad3ac0
Make multi-byte and surrounding_word tests more readable
...
Just merge multi-byte tests into the main word movement tests
2022-03-21 15:41:42 -06:00
Nathan Sobo
210fa4c443
Remove CharKind::Newline
...
This is just a character, and so it seems clearer to refer to it specifically when we want to know if a character is a newline. There was only one case where we relied on Newline being different from Whitespace, and we special-cased that instance. Changing this actually makes us match the behavior of VS Code when double-clicking runs of multiple newlines.
/cc @as-cii
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-21 15:17:32 -06:00
Nathan Sobo
baeb7d27b8
Clarify word movement function names and improve test coverage
...
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-21 15:17:25 -06:00
Max Brunsfeld
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
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
Nathan Sobo
05ddd26d75
Merge pull request #648 from zed-industries/update-fonts-to-1-2-1
...
Update Zed fonts to 1.2.1
2022-03-21 12:19:33 -06:00
Antonio Scandurra
13a2dacc60
💄
2022-03-21 18:16:06 +01:00
Nate Butler
1c23a45d02
Update Zed fonts to 1.2.1
2022-03-21 12:11:31 -04:00
Antonio Scandurra
9575796f9e
Allow unfollowing of leaders by clicking on their avatar
2022-03-21 17:10:23 +01:00
Antonio Scandurra
a154e4500b
Implement Workspace::unfollow
...
This also changes the structure of the follow state back to be per-pane. This
is because we can't share the same view state across different panes for
a couple of reasons:
- Rendering the same view in N different panes is almost always not something
that we want due to global state such as focus.
- If we allowed it and a user followed the same person in two different panes,
there would be no way of unfollowing in one pane without also unfollowing in
the other.
2022-03-21 16:55:18 +01:00
Antonio Scandurra
a2dbebd9ba
Hide cursor both locally and remotely when following
2022-03-21 15:16:56 +01:00
Nathan Sobo
c03eec019c
Merge pull request #647 from zed-industries/fix-reopening-project-items
...
Pass project entry id to Pane when opening a project item
2022-03-20 11:01:23 -06:00
Nathan Sobo
7cb8935ff5
Pass project entry id to Pane when opening a project items
...
This fixes an oversight where we were failing to associate project items with their project entry ids, which broke the logic that prevented the same project entry from being opened twice in the same pane.
2022-03-20 08:54:20 -06: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
e338da0271
Allow clicking a titlebar avatar to initiate following
2022-03-18 13:37:07 -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
df0632011c
🎨 client
...
Forgot to push this yesterday night.
2022-03-18 13:03:43 -07:00
Max Brunsfeld
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
Max Brunsfeld
2c53175566
Rename FollowedItem -> FollowableItem
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-18 10:12:51 -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
3d81eb9ddf
Allow accessing workspace after adding item to pane
2022-03-18 14:59:53 +01:00
Antonio Scandurra
10e6d82c3e
WIP: Start on sending view updates to followers
2022-03-18 14:20:09 +01:00