Commit Graph
3277 Commits
Author SHA1 Message Date
a88320dc5f Remove workspace::Item trait
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2022-03-16 13:34:06 -07:00
Antonio Scandurra e8efaed1b2 Merge pull request #633 from zed-industries/refresh-windows-panic
Fix edge cases when calling `refresh_windows`
2022-03-16 14:58:49 +01:00
Antonio ScandurraandNathan Sobo b0afb64a6e Fix edge cases when calling refresh_windows
This commit ensures that new views are rendered for the first time. This fixes
a panic that could be reproduced by dropping the `ThemeSelector` and opening
the file finder during the same update.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-16 14:51:54 +01:00
Antonio Scandurra 17742a9fe8 Merge pull request #632 from zed-industries/underline-unused-warning
Restore underline for warnings about unused code
2022-03-16 09:52:11 +01:00
Max Brunsfeld 76fc9c955e Restore underline for warnings about unused code 2022-03-15 13:13:33 -07:00
Antonio Scandurra a0224cbe71 Merge pull request #630 from zed-industries/fix/go-to-line-panic
Fix go to line panic by replacing an unwrap with an and_then
2022-03-15 18:11:26 +01:00
Keith Simmons 72188456b2 fix go to line panic by replacing an unwrap with an and_then 2022-03-15 09:31:24 -07:00
Antonio Scandurra f20aaf5c35 v0.21.0 2022-03-15 16:48:28 +01:00
Antonio Scandurra 22688c7c82 Merge pull request #627 from zed-industries/golden-line-height
Compute line-height as a multiple of font size
2022-03-15 16:45:38 +01:00
Antonio ScandurraandNathan Sobo 447f350123 Compute line-height as a multiple of font size
...instead of using the bounding box. This makes `PragmataPro` and other
fonts render more cleanly.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 16:35:06 +01:00
Antonio Scandurra 8122abeb64 Merge pull request #626 from zed-industries/inactive-code-diagnostics
De-emphasize unnecessary code diagnostics
2022-03-15 16:09:06 +01:00
Antonio ScandurraandNathan Sobo c6c72a7249 Skip over unnecessary code diagnostics when hitting f8
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:55:39 +01:00
Antonio ScandurraandNathan Sobo 7155dabf5b Fade out unnecessary code
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:51:59 +01:00
Antonio ScandurraandNathan Sobo 41bd58e3ac Only show errors and warnings in project diagnostics
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:30:05 +01:00
Antonio Scandurra 182b2b175d Merge pull request #625 from zed-industries/go-to-prev-diagnostic
Go to previous diagnostic via `shift-f8`
2022-03-15 15:22:53 +01:00
Antonio ScandurraandNathan Sobo 021699e51c Implement shift-f8 to go to previous diagnostic
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:13:23 +01:00
Antonio ScandurraandNathan Sobo a6d0caf557 Don't seek FilterCursor upon creation
This lets us use `next` or `prev` to decide whether to park the cursor
at the first or last filtered item.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:13:23 +01:00
Antonio ScandurraandNathan Sobo f10fd6c419 Randomize test FilterCursor::prev
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:13:23 +01:00
Antonio Scandurra 45ce503afd Start on implementing filtering support for Cursor::prev 2022-03-15 15:13:23 +01:00
Nathan Sobo 7c6fe56347 Merge pull request #624 from zed-industries/fix-broken-syntax-highlighting
Make all `HighlightStyle` properties optional
2022-03-15 06:05:35 -06:00
Antonio Scandurra fbf7cdf4f2 Make all HighlightStyle properties optional
Previously, some of those properties such the font weight, style and color
would be mandatory: when the theme didn't specify them, Zed would use a default
value during deserialization. This meant that those default properties would
unconditionally override the base text style, causing a rendering bug when
combining syntax highlights with diagnostic styles.

This commit fixes that by making `HighlightStyle`s more additive: each property
can be set independently and only the properties that theme specifies get
overridden in the base text style.
2022-03-15 10:39:43 +01:00
Max Brunsfeld 72692f1700 Merge pull request #622 from zed-industries/guest-settings-file
Open settings file in new window if current window isn't local
2022-03-14 17:19:11 -07:00
Max BrunsfeldandKeith Simmons 3a439f141d Open settings file in new window if current window isn't local
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-14 17:12:07 -07:00
Max Brunsfeld d193c9a358 v0.20 2022-03-14 15:59:52 -07:00
Max Brunsfeld 38dcd522de Bump protocol version number 2022-03-14 15:57:39 -07:00
Max Brunsfeld e7835caac4 Merge pull request #621 from zed-industries/autoclose-before-punctuation
Autoclose brackets before a language-specific set of characters
2022-03-14 15:33:47 -07:00
Max Brunsfeld 325e6c31ae Autoclose brackets before a language-specific set of characters
Fixes #588
2022-03-14 15:17:40 -07:00
Max Brunsfeld 2c25e619b4 Respect theme's background color when rendering field editors 2022-03-14 14:24:51 -07:00
Max Brunsfeld 7bdb91f4ec Merge pull request #619 from zed-industries/project-entry-ids
Ensure that worktree entry ids are unique across the project
2022-03-14 12:43:58 -07:00
Max Brunsfeld 5822b47b74 Ensure that worktrees' entry ids are unique across the project
Fixes #512
2022-03-14 12:36:56 -07:00
Max Brunsfeld 91b33e4432 Merge pull request #618 from zed-industries/fix-block-layout-panic
Fix layout panic on empty editors with blocks
2022-03-14 12:25:05 -07:00
Max BrunsfeldandAntonio Scandurra e392368d89 Fix layout panic on empty editors with blocks
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-14 12:03:26 -07:00
Antonio Scandurra 40a4c18ee4 Merge pull request #604 from zed-industries/set-selections-assertion
Ensure there's at least one selection in `Editor::set_selections`
2022-03-14 17:00:12 +01:00
Antonio Scandurra 21eebede37 Add more assertions to investigate #503 in the future 2022-03-14 16:53:39 +01:00
Antonio ScandurraandNathan Sobo 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 be3bfb2699 Merge pull request #603 from zed-industries/fix-presenter-panic
Re-render workspace when removing an inactive pane
2022-03-14 16:16:52 +01:00
Antonio ScandurraandNathan Sobo 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 ScandurraandNathan Sobo 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 e62781a57b Merge pull request #602 from zed-industries/fix-atlas-panic
Don't draw scene elements if their size is zero
2022-03-14 15:38:42 +01:00
Antonio ScandurraandNathan Sobo 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 e7d0bf1c36 Merge pull request #574 from zed-industries/settings-file
Read settings from a JSON file
2022-03-13 10:52:47 -07: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
Antonio Scandurra 2cb4d0a35e Merge pull request #597 from zed-industries/select-on-rename
When renaming, select new name and ghost old names
2022-03-12 19:12:09 +01:00
Nathan SoboandAntonio Scandurra 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 SoboandAntonio Scandurra 308cead8a8 🙊
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-12 10:44:11 -07:00
Nathan SoboandAntonio Scandurra 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 SoboandAntonio Scandurra 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