Commit Graph
39175 Commits
Author SHA1 Message Date
Keith Simmons dda7cddc7c Add word and line movement in vim normal mode
Add jump to start and end of the document
Move vim tests to relevant vim files
Rename VimTestAppContext to VimTestContext for brevity
Improve VimTestContext assertions to pretty print locations when selection position assertion panics
2022-03-27 17:58:28 -07:00
Nathan Sobo d22cc7b8c7 Merge pull request #686 from zed-industries/disable-vim-on-start
Fully disable vim mode on start unless it's enabled
2022-03-26 19:23:46 -06:00
Nathan Sobo 96254384cf Assign normal mode when re-enabling 2022-03-26 19:19:12 -06:00
Nathan Sobo 8a57598939 Fully disable vim mode on start unless it's enabled
Also: Make some structural adjustments to remove the need for defer. Instead of accessing the global in associated VimState functions, have a single method that allows us to call update instance methods.
2022-03-26 19:19:12 -06:00
Nathan Sobo 60dff22cf2 Test that vim mode can be disabled on startup 2022-03-26 19:19:12 -06:00
Nathan Sobo c1f83a7a6d 0.23.0 2022-03-26 07:22:01 -06:00
Nathan Sobo 331c615c31 Merge pull request #684 from zed-industries/subword
Add bindings for subword movement and deletion
2022-03-26 07:18:29 -06:00
Nathan Sobo b0e20a4715 Merge pull request #682 from zed-industries/vim-hjkl
Vim hjkl
2022-03-26 07:11:46 -06:00
Nathan Sobo e94325777a Add bindings for subword movement and deletion 2022-03-26 07:10:16 -06:00
Keith Simmons 19c4e3cbff Fixed issue with enabling and disabling vim mode dynamically
Also added indoc and marked text utility to vim tests to improve readability
2022-03-25 20:10:52 -07:00
Keith SimmonsandNathan Sobo 4e569432a2 Add clip_to_line_end to display_map/snapshot and set it to ensure vim positioning in normal mode
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:52 -07:00
Keith SimmonsandNathan Sobo 4a4982d518 Add initial vim mode mode switching
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:37 -07:00
Nathan Sobo b5b408ad4b Merge pull request #680 from zed-industries/unregister-on-disconnect
Properly clear out registration and sharing state when a host loses their connection
2022-03-25 11:52:25 -06:00
Nathan SoboandAntonio Scandurra 504a88d3ab Add integration test for dropping host connections while sharing
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:32:31 -06:00
Nathan SoboandAntonio Scandurra a22e44d86c Clear out project registration and sharing state on disconnect
Previously, we weren't fully clearing the state associated with projects and worktrees when losing connection. This caused us to not see guest avatars disappear and not be able to re-share upon reconnect.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:15:08 -06:00
Antonio Scandurra 0b4e735917 Merge pull request #678 from zed-industries/disk-based-diagnostics-transformation
Preserve disk-based diagnostics whose ranges intersect with an edit since save
2022-03-25 17:04:07 +01:00
Antonio Scandurra e59bdfe6c5 Merge pull request #673 from zed-industries/unfold-on-select-match
Unfold when selecting next match
2022-03-25 15:40:22 +01:00
Antonio ScandurraandNathan Sobo f7b13fbc0b Preserve disk-based diagnostics whose ranges intersect with an edit since save
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-25 15:35:31 +01:00
Antonio ScandurraandNathan Sobo 8aa34653a9 Rename Patch::transform_old to Patch::old_to_new
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-25 14:57:40 +01:00
Antonio Scandurra 5c3e450318 Introduce Patch::transform_old 2022-03-25 14:28:38 +01:00
Nathan Sobo 28251eba43 Merge branch 'main' into unfold-on-select-match 2022-03-24 14:13:27 -06:00
Nathan Sobo 77a4829660 Merge pull request #672 from zed-industries/fix-unfollowing-on-edit
Automatically unfollow leader only for edits that originate from the follower editor
2022-03-24 13:26:28 -06:00
Keith Simmons ae4be7bb55 Merge pull request #676 from zed-industries/highlighted-text-fix
Highlighted text fix
2022-03-24 11:52:06 -07:00
Keith SimmonsandNathan Sobo 1eacdcf00a Remove result from anchor cmp functions
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-24 11:48:31 -07:00
e0d394eaf6 Change language::anchor::min() to a constant
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-24 10:41:33 -07:00
dcb6b335e7 Make rename highlights work across multibuffer excerpts
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-24 10:22:47 -07:00
Antonio Scandurra d980cab5d9 Test the new inclusive parameter when unfolding 2022-03-24 17:20:28 +01:00
Antonio Scandurra 47416066c4 Unfold range when selecting the next match
Selected matches are unfolded when in project search, buffer search and
when hitting `cmd-d` to select the next match.
2022-03-24 17:16:21 +01:00
Antonio Scandurra cd4e282144 Rename Editor::unfold to Editor::unfold_lines 2022-03-24 17:15:40 +01:00
Antonio Scandurra 3f8b9684ce Allow customizing whether FoldMap::unfold treats ranges as inclusive 2022-03-24 17:14:41 +01:00
Antonio Scandurra e1945e2abf Add a unit test for editor edit events 2022-03-24 09:17:56 +01:00
Antonio Scandurra 529fdc2764 Emit an Edited event when ending, undoing or redoing a transaction 2022-03-24 08:56:37 +01:00
Antonio Scandurra a0ca4a13f8 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
Antonio Scandurra a7e3a51ac6 Use Editor::transact everywhere
This is in preparation of emitting an edit event every time a transaction ends
or it is undone/redone.
2022-03-24 08:48:06 +01:00
Max BrunsfeldandKeith Simmons f64c214207 Fix incorrect highlighting when an empty range is highlighted via the DisplayMap
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-23 18:20:55 -07:00
Max Brunsfeld 731537fe5a Merge pull request #669 from zed-industries/extend-selection-fixes
Fix extending selections starting at ends of syntax nodes
2022-03-23 15:56:35 -07:00
Max Brunsfeld 0876781606 Fix extending selections starting at ends of other nodes
Fixes #478
2022-03-23 15:38:23 -07:00
Max Brunsfeld 5770e54f3a Merge pull request #657 from zed-industries/global-observations
Add global change observations
2022-03-23 14:11:33 -07:00
Max Brunsfeld 1f99157c36 0.22 2022-03-23 12:09:07 -07:00
Max Brunsfeld c23723cce2 Merge pull request #668 from zed-industries/no-lsp-when-following
Avoid making LSP requests when moving cursor due to following
2022-03-23 11:54:45 -07:00
Max Brunsfeld 1c58e616b9 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 1f14c68362 Merge pull request #666 from zed-industries/keychain
Refine authentication and keychain interaction
2022-03-23 11:48:49 -07:00
Max Brunsfeld 00cee40996 Avoid making LSP requests when moving cursor due to following 2022-03-23 11:41:20 -07:00
Keith SimmonsandAntonio Scandurra b931215d49 Add navigation deduping
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-03-23 11:32:25 -07:00
Nathan SoboandMax Brunsfeld bc4956e837 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 SoboandMax Brunsfeld c77d659b88 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 SoboandMax Brunsfeld 8b684e14dc 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 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
Max Brunsfeld 32af5317c8 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