Antonio Scandurra
21eebede37
Add more assertions to investigate #503 in the future
2022-03-14 16:53:39 +01:00
Antonio Scandurra
a3ea6a34d9
Ensure there's at least one selection in Editor::set_selections
...
This commit introduces an assertion that will cause Zed to panic as
soon as the invariant gets violated. This will be useful to investigate
issue #503 .
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-14 16:17:14 +01:00
Antonio Scandurra
5d5f89231b
Hold strong handle in ChildView
...
This eliminates a whole class of errors where the `ChildView` could
be referring to a view that doesn't exist anymore. That probably still
indicates that there's an underlying bug, but at least we won't panic.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-14 15:49:11 +01:00
Antonio Scandurra
bae44d8132
Re-render workspace when removing an inactive pane
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-14 15:49:08 +01:00
Antonio Scandurra
47b40e3839
Don't draw scene elements if their size is zero
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-14 15:29:18 +01:00
Max Brunsfeld
b33a049958
Merge branch 'main' into settings-file
2022-03-13 10:43:23 -07:00
Antonio Scandurra
1e9b6b050d
Merge pull request #596 from zed-industries/fix/dropped-subscription-in-callback
...
Fix Dropped Subscription in Handler Bug
2022-03-12 19:14:38 +01:00
Nathan Sobo
992fc07133
Hide selections in original editor when renaming
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-12 10:45:11 -07:00
Nathan Sobo
308cead8a8
🙊
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-12 10:44:11 -07:00
Nathan Sobo
9f629fa307
Improve selection handling when pending rename is taken
...
- Set selection to the intuitive cursor position when moving up rather than restoring the full selection of the rename editor.
- When cancelling, restore the original selection.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-12 10:30:57 -07:00
Nathan Sobo
33bcd6d904
Merge remote-tracking branch 'origin/main' into select-on-rename
2022-03-12 10:10:23 -07:00
Nathan Sobo
4f086b8d7a
Refresh document highlight after rename, but not during
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-12 10:10:06 -07:00
Antonio Scandurra
965f82ec31
Merge pull request #589 from zed-industries/fold-map-test-failures
...
Avoid re-using excerpt IDs in `MultiBuffer`
2022-03-12 17:59:48 +01:00
Antonio Scandurra
dd1711d53f
Account for all excerpts ever inserted when determining new excerpt ID
2022-03-12 17:50:09 +01:00
Antonio Scandurra
cd4a9f3178
Fix bug in selection position maintenance while renaming symbol
...
We were resolving the selection with the wrong buffer, which now
causes a panic because we don't check the anchor's `buffer_id` anymore.
2022-03-12 13:03:45 +01:00
Max Brunsfeld
20fed599b2
Start work on relaying settings to language servers
2022-03-11 17:36:27 -08:00
Max Brunsfeld
48848de82c
Store settings as a global via a gpui app_state
2022-03-11 15:58:58 -08:00
Keith Simmons
c50be72214
Format including missing formatting changes from previous PR
2022-03-11 15:38:01 -08:00
Keith Simmons
16afb3d5b1
Add some tests for global events and fix potential bug in subscriptions when subscription is dropped inside of it's own callback
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-11 15:34:04 -08:00
Nathan Sobo
c35a96c425
On rename, replace background highlights with transparent text highlights
2022-03-11 15:54:17 -07:00
Nathan Sobo
951fd1ab36
Merge branch 'main' into select-on-rename
2022-03-11 15:30:07 -07:00
Max Brunsfeld
2103eec463
Allow registering handlers for typed LSP requests
2022-03-11 13:19:10 -08:00
Max Brunsfeld
a137abe2de
Add a snippet unit test with an escaped curly brace
2022-03-11 13:02:20 -08:00
Keith Simmons
87b1cfe34f
Merge pull request #576 from zed-industries/cursor-shape
...
Add support for rendering the cursor as a Block and Underscore
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-11 11:51:24 -08:00
Max Brunsfeld
7a68b2d371
Provide JSON language server with settings schema
2022-03-11 11:46:22 -08:00
Max Brunsfeld
862ec01e7d
Add API for handling custom requests from the language server
2022-03-11 11:44:02 -08:00
Keith Simmons
17ac240511
Merge pull request #586 from zed-industries/global-events
...
Global Events
Co-authored-by: Max Brunsfeld <nathan@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-11 11:42:25 -08:00
Keith Simmons
144591d639
Minor renames for clarity
2022-03-11 11:25:36 -08:00
Max Brunsfeld
6091caee8e
Merge branch 'main' into settings-file
2022-03-11 10:04:17 -08:00
Max Brunsfeld
022bb28a59
Handle escaped characters in snippets
2022-03-11 09:57:43 -08:00
Nathan Sobo
fd36b25db1
Merge pull request #587 from zed-industries/lsp-progress
...
Show language server progress in the status bar
2022-03-11 10:57:24 -07:00
Antonio Scandurra
71aa5e5360
💄
2022-03-11 17:13:28 +01:00
Antonio Scandurra
a74b602f18
Assume the anchor is valid if we can find an excerpt that contains it
2022-03-11 17:08:12 +01:00
Nathan Sobo
5407f25c94
Don't reuse excerpt ids in MultiBuffer
...
This prevents anchors from swapping their ordering, which was causing issues in FoldMap.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-11 08:50:50 -07:00
Nathan Sobo
134496ce8f
Remove dead code
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-11 08:24:42 -07:00
Antonio Scandurra
c67cfd7fe1
Respect excerpt's range when comparing two anchors both belonging to it
2022-03-11 12:42:22 +01:00
Antonio Scandurra
18b1e9d35f
Don't starve main thread when lots of messages/events arrive at once
2022-03-11 10:09:13 +01:00
Antonio Scandurra
7a454003fe
Show the last in-progress task from language servers
2022-03-11 09:59:13 +01:00
Keith Simmons
5f62f69907
Add unwrap check if buffer_line not available
2022-03-10 20:04:16 -08:00
Keith Simmons
81fc812221
Add global events to MutableAppContext and raise global event when new workspace is created
2022-03-10 20:03:01 -08:00
Keith Simmons
b62daebde1
Merge pull request #563 from zed-industries/mouse-history-navigation
...
Add missing mouse button events and mouse history navigation
2022-03-10 17:39:36 -08:00
Max Brunsfeld
bdb39f6247
Create the settings file if needed when opening it via command
2022-03-10 17:27:46 -08:00
Max Brunsfeld
9a6819b899
For single-file worktrees start LSP with parent dir as CWD
2022-03-10 16:06:12 -08:00
Max Brunsfeld
44a68b723c
Add cmd-, as a keybinding for opening settings
2022-03-10 15:51:57 -08:00
Nathan Sobo
94bf3366f6
Focus in-progress rename editor when editor is focused
2022-03-10 16:42:20 -07:00
Nathan Sobo
a498cd32c8
When renaming, match the color of the renamed token in the rename editor
2022-03-10 16:38:45 -07:00
Max Brunsfeld
f32107eb8e
Always refresh the windows when the settings change
2022-03-10 15:34:04 -08:00
Max Brunsfeld
00056fbe88
Load the settings file on a background thread during startup
2022-03-10 15:25:22 -08:00
Nathan Sobo
69ce021f32
Remove unused variable
2022-03-10 15:27:29 -07:00
Nathan Sobo
3968b37e26
When renaming, fade out the old name and select all
2022-03-10 14:55:31 -07:00