Commit Graph
3373 Commits
Author SHA1 Message Date
Antonio Scandurra 27fbbeffe9 WIP 2022-03-23 19:05:46 +01:00
Antonio ScandurraandKeith Simmons 3dde930f6b Don't push a duplicate nav entry when changing selections via the mouse
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-23 18:45:45 +01:00
Antonio Scandurra dd6c8a17e5 Merge pull request #662 from zed-industries/fix-refresh-selections-when-mouse-selecting
Account for pending selections when calling `Editor::refresh_selections`
2022-03-23 15:58:28 +01:00
Antonio ScandurraandNathan Sobo c6b87d4e9c Don't destroy pending selection on Editor::refresh_selections
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 15:21:11 +01:00
Antonio Scandurra 2f1b1abbb8 Merge pull request #661 from zed-industries/follow
Introduce basic following experience
2022-03-23 15:17:44 +01:00
Antonio ScandurraandNathan Sobo 7266849908 Cycle through panes spatially rather than in the order in which they created
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 15:06:25 +01:00
Antonio ScandurraandNathan Sobo d94d39357d Don't show local cursors when editor is not focused
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:46:33 +01:00
Antonio ScandurraandNathan Sobo beb370a308 Focus followed items when they become active if the pane is active
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:41:48 +01:00
Antonio ScandurraandNathan Sobo a4b0ec4a33 Activate previous pane and next pane via cmd-k cmd-left and cmd-k cmd-right
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:26:00 +01:00
Nathan Sobo a207d05604 Update follow binding, remove unfollow binding
The previous binding to follow had ergonomics issues for the frequency that I think we'll want to use it. It would also conflict with the sub-word selection binding.

Now that moving the cursor etc unfollows, I don't think we need the follow binding.
2022-03-23 06:19:35 -06:00
Nathan Sobo 54c8815162 Merge pull request #656 from zed-industries/add-editor-lifetime-events
Add editor lifetime events
2022-03-23 05:59:22 -06:00
Antonio Scandurra 831bddc331 Account for pending selections when calling Editor::refresh_selections 2022-03-23 11:46:35 +01:00
Antonio Scandurra 6948924e9a Fix global nested event test after turning subscriptions into effects 2022-03-23 09:14:33 +01:00
Keith Simmons 753c7ff5bb Merge pull request #655 from zed-industries/add-editor-selection-helpers
Add editor selection helpers
2022-03-22 22:44:56 -07:00
Max BrunsfeldandNathan Sobo 1d4061dcb9 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 BrunsfeldandNathan Sobo 1329824507 Add unit test for editor's following methods
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 17:39:34 -07:00
Max BrunsfeldandNathan Sobo a60cc61dd8 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 BrunsfeldandNathan Sobo 4436301fa3 Coalesce followed view updates only within one frame
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 17:03:24 -07:00
Max BrunsfeldandNathan Sobo b920b865c4 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
Keith Simmons 8bf564ecf7 Add editor lifetime events 2022-03-22 16:14:32 -07:00
Keith Simmons 8d4deb8693 Add editor selection utilities
Also improved test that was failing during above to use marker text approach as a drive by
2022-03-22 16:08:22 -07:00
Keith Simmons 5b92fcdf72 Merge pull request #654 from zed-industries/remove-movment-results
Remove results from movement functions
2022-03-22 16:07:39 -07:00
Max Brunsfeld 5d1658e1f1 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
Max Brunsfeld 421b170515 Use env_logger when running the app in a terminal 2022-03-22 13:32:25 -07:00
Max Brunsfeld a0d18fc007 Allow customizing the pane's following border width in the theme 2022-03-22 13:32:25 -07:00
Max Brunsfeld 76cf065588 Make UpdateBuffer a foreground message 2022-03-22 13:32:25 -07:00
Keith Simmons 3e22400212 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 995b1421aa 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 ScandurraandNathan Sobo 13c6ca7adb 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 ScandurraandNathan Sobo 43eeb11192 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 ScandurraandNathan Sobo 8d901860f2 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 ScandurraandNathan Sobo cd00947e17 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 b6dd7c1662 WIP 2022-03-22 13:35:37 +01:00
Antonio Scandurra 8ac8e39983 Bump protocol version 2022-03-22 13:19:07 +01:00
Antonio Scandurra cbf7584ad3 Merge branch 'main' into follow 2022-03-22 11:20:55 +01:00
Antonio Scandurra 2fea8a3cda Stop following when leader disconnects 2022-03-22 11:16:04 +01:00
Antonio Scandurra e3bd33a549 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 1b6236e3db Reflect leader's view state when recycling existing local editors 2022-03-22 10:51:17 +01:00
Antonio Scandurra 6e16603070 Always render local selections on top of remote ones 2022-03-22 10:31:28 +01:00
Antonio Scandurra fa960c0e43 Follow last collaborator or the next one via cmd-alt-shift-f 2022-03-22 10:16:58 +01:00
Antonio Scandurra 3f03d2b641 Stop following when activating a different item on the follower pane 2022-03-22 09:42:37 +01:00
Antonio Scandurra 0de3f0980f Automatically unfollow when editing, scrolling or changing selections 2022-03-22 09:17:01 +01:00
Max Brunsfeld 0cc1f68b61 WIP - Start work on unfollowing automatically 2022-03-21 21:52:28 -07:00
Max Brunsfeld 8c5e1610b1 Always mirror the leader's selections when following 2022-03-21 21:47:29 -07:00
Nathan Sobo 3b5830d041 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 47496eda80 Improve DisplayPoint Debug impl 2022-03-21 21:07:56 -06:00
Nathan Sobo ba73ef8861 Implement next_subword_end 2022-03-21 20:02:08 -06:00
acad71b1f5 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 c9aa130958 Show borders around avatars and panes to indicate following state 2022-03-21 15:12:15 -07:00
Nathan Sobo 37420a1dd0 Extract logic for scanning over character boundaries 2022-03-21 16:01:22 -06:00