Antonio Scandurra
bff414cfbc
Remove Editor::find_or_create
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 15:13:47 +01:00
Antonio Scandurra
6f9c37851c
Add Editor::for_multibuffer
and repurpose Editor::for_buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:39:02 +01:00
Antonio Scandurra
44d997c00c
Rename app_state
to global
in gpui
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:33:01 +01:00
Antonio Scandurra
84bacc556f
Rename build_editor
to build_item
in Pane::open_item
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:31:05 +01:00
Antonio Scandurra
6446660c88
Rename open_buffer_for_path
to open_buffer
2022-03-17 11:42:13 +01:00
Antonio Scandurra
e6755f4115
Search only in active pane when using Editor::find_or_create
2022-03-17 11:39:39 +01:00
Antonio Scandurra
a691c2fbdb
Delete unused code
2022-03-17 11:33:58 +01:00
Antonio Scandurra
0efce8f70a
Rename ItemView
to Item
2022-03-17 11:32:46 +01:00
Antonio Scandurra
aced1e2315
Finish refactoring of how editors are opened
2022-03-17 11:29:46 +01:00
Nathan Sobo
728c708150
WIP: Massage opening of editors
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-16 17:40:09 -06:00
Nathan Sobo
1f9885ec42
Remove open_item_in_pane
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-16 16:08:13 -06:00
Nathan Sobo
0036e5c86c
Replace ProjectEntry struct with ProjectEntryId
...
Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-16 15:59:47 -06:00
Max Brunsfeld
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 Scandurra
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 Scandurra
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 Scandurra
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 Scandurra
7155dabf5b
Fade out unnecessary code
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:51:59 +01:00
Antonio Scandurra
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 Scandurra
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 Scandurra
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 Scandurra
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 Brunsfeld
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 Brunsfeld
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 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
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 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