Commit Graph
39175 Commits
Author SHA1 Message Date
Antonio Scandurra 10bd3344c9 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 b4ee707431 Add buffer method for getting the symbols containing a position 2022-03-15 14:04:58 -07:00
Max Brunsfeld 235f52427a Restore underline for warnings about unused code 2022-03-15 13:13:33 -07:00
Antonio Scandurra f906b9ec5c 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 6939787b68 fix go to line panic by replacing an unwrap with an and_then 2022-03-15 09:31:24 -07:00
Antonio Scandurra 652675e39e v0.21.0 2022-03-15 16:48:28 +01:00
Antonio Scandurra 613ab4019f 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 bdd8bbb1da 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 5a47ed1e6f 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 e1e907c8b0 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 1816b44648 Fade out unnecessary code
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:51:59 +01:00
Antonio ScandurraandNathan Sobo d567abe273 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 14e9ff5ea6 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 f37b22212f 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 3217629af3 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 bbd6140677 Randomize test FilterCursor::prev
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:13:23 +01:00
Antonio Scandurra c2c68cbfe9 Start on implementing filtering support for Cursor::prev 2022-03-15 15:13:23 +01:00
Nathan Sobo 324fa9ef3f 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 6013fb8d0f 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 2b57a08580 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 d5a8001155 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 34d4176705 v0.20 2022-03-14 15:59:52 -07:00
Max Brunsfeld 7b41e4f33c Bump protocol version number 2022-03-14 15:57:39 -07:00
Max Brunsfeld 7e24f92975 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 77bbf76cbc Autoclose brackets before a language-specific set of characters
Fixes #588
2022-03-14 15:17:40 -07:00
Max Brunsfeld cad1725c35 Respect theme's background color when rendering field editors 2022-03-14 14:24:51 -07:00
Max Brunsfeld 3d1d65be15 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 76ef5941e5 Ensure that worktrees' entry ids are unique across the project
Fixes #512
2022-03-14 12:36:56 -07:00
Max Brunsfeld a8a9f0301b 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 f796fa171b 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 f1cc0cfbc5 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 e1405addd2 Add more assertions to investigate #503 in the future 2022-03-14 16:53:39 +01:00
Antonio ScandurraandNathan Sobo 68191e9ba7 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 2c7fc57fac 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 dae6a540b5 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 88ac3564de 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 6e1a0bee90 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 351477793b 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 aec05dac87 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 836480a3e3 Merge branch 'main' into settings-file 2022-03-13 10:43:23 -07:00
Antonio Scandurra b348cc77ee 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 cef4f51de2 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 7027cec1a9 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 a93bdc4538 🙊
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-12 10:44:11 -07:00
Nathan SoboandAntonio Scandurra 795b6344da 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 ea7f2b309d Merge remote-tracking branch 'origin/main' into select-on-rename 2022-03-12 10:10:23 -07:00
Nathan SoboandAntonio Scandurra f1881795f4 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 682ac9d92c 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 c3ac7e639b Account for all excerpts ever inserted when determining new excerpt ID 2022-03-12 17:50:09 +01:00
Antonio Scandurra 4ee1f2dfc4 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