Commit graph

3535 commits

Author SHA1 Message Date
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
Max Brunsfeld
eb4035630a
Merge pull request #666 from zed-industries/keychain
Refine authentication and keychain interaction
2022-03-23 11:48:49 -07:00
Max Brunsfeld
f7e7d58f49 Avoid making LSP requests when moving cursor due to following 2022-03-23 11:41:20 -07:00
Keith Simmons
e36104f30d Add navigation deduping
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-03-23 11:32:25 -07:00
Nathan Sobo
4a42025c28 Authenticate on startup if ZED_IMPERSONATE is assigned
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-23 12:25:06 -06:00
Nathan Sobo
657b92b020 Don't prompt for keychain access when launching from a pty
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-23 12:18:17 -06:00
Nathan Sobo
ee9ed936e4 Don't try keychain after authentication fails
Previously, we were achieving this by deleting the keychain item, but this can sometimes fail which leads to an infinite loop. Now, we explicitly never try the keychain when reattempting authentication after authentication fails.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-23 12:15:36 -06:00
Antonio Scandurra
5cd94b5b92 WIP 2022-03-23 19:05:46 +01:00
Antonio Scandurra
255a8c5d14 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
Max Brunsfeld
29892ce5d7
Merge pull request #663 from zed-industries/following-pending-selections
Fix error in follower when leader creates pending selections
2022-03-23 10:32:40 -07:00
Keith Simmons
0a8d543f66 Add global tests and wrap global update functions in update call to flush effects
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-03-23 10:27:27 -07:00
Max Brunsfeld
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
Keith Simmons
454f7a570c Add global change observations 2022-03-23 09:14:12 -07:00
Antonio Scandurra
10f176073d
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 Scandurra
b73f57d37a 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
004f98cc6d
Merge pull request #661 from zed-industries/follow
Introduce basic following experience
2022-03-23 15:17:44 +01:00
Antonio Scandurra
60b6b0b317 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 Scandurra
5ac39aa7cd 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 Scandurra
4f27049305 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 Scandurra
edc038a1cf 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
097bbe3e07 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
da15669e17
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
d24bd6f19a Account for pending selections when calling Editor::refresh_selections 2022-03-23 11:46:35 +01:00
Antonio Scandurra
3298529ed1 Fix global nested event test after turning subscriptions into effects 2022-03-23 09:14:33 +01:00
Keith Simmons
7acde40266
Merge pull request #655 from zed-industries/add-editor-selection-helpers
Add editor selection helpers
2022-03-22 22:44:56 -07:00
Max Brunsfeld
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
fad299eb3f 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 Brunsfeld
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
880eaa268b 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 Brunsfeld
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
Keith Simmons
fba6f24ab7 Add editor lifetime events 2022-03-22 16:14:32 -07:00
Keith Simmons
6a1c197c1b 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
308bfa3486
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
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
Max Brunsfeld
0a3f013e00 Use env_logger when running the app in a terminal 2022-03-22 13:32:25 -07:00
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