Commit Graph
1255 Commits
Author SHA1 Message Date
Antonio Scandurra 94293b3bf9 Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/window.rs
2024-01-12 14:31:13 +01:00
Piotr Osiewicz 8d294211db settings.json: Suggest font names for buffer_font_family 2024-01-11 23:23:10 +01:00
Piotr Osiewicz a1049546a2 gpui: Validate font contents at load time.
During layout of EditorElement we use 'm' character from current font to calculate sizes, panicking with fonts that do not have that character (e.g. Arabic fonts). It's not really EditorElement's fault, as it assumes that the font it's dealing with is gonna have that character available.
To prevent a crash, I added validation while loading a family that a given font contains the glyphs we're gonna use down the line.
2024-01-11 23:23:10 +01:00
Conrad Irwin a8b8be47e0 Don't hold platform lock while calling user callbacks
Inspired by a bug where using Edit -> Copy from the menu created a
deadlock.
2024-01-11 13:52:50 -07:00
Conrad Irwin 4d66ade332 Fix multi-key shortcuts (#4025)
An old fix was ported over from gpui1, and the two fixes could not exist
side-by-side. Delete this code and let the keymap handle it

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-11 11:36:51 -07:00
Conrad Irwin 51cc6b1e1c Guard against infinite loop in focus handling (#4023)
Release Notes:

- Fix an infinite loop in focus handling
2024-01-11 11:26:37 -07:00
Conrad Irwin 23fe720ca6 Fix multi-key shortcuts
An old fix was ported over from gpui1, and the two fixes could not exist
side-by-side. Delete this code and let the keymap handle it
2024-01-11 11:24:55 -07:00
a98d048905 gpui: Make TextSystem::line_wrapper non-fallible. (#4022)
Editors WrapMap could become desynchronised if user had an invalid font
specified in their config. Compared to Zed1, WrapMap ignored the
resolution failure instead of panicking. Now, if there's an invalid font
in the user config, we just fall back to an arbitrary default.


Release Notes:
- Fixed the editor panic in presence of invalid font name in the config
(fixes https://github.com/zed-industries/community/issues/2397)

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-01-11 18:52:00 +01:00
Conrad Irwin 06493471aa Guard against infinite loop in focus handling 2024-01-11 10:38:08 -07:00
Antonio Scandurra 11b433dc1c Move back to sorting entries in the depth map as we insert them 2024-01-11 18:24:07 +01:00
Antonio Scandurra 101cedb5f7 💄 2024-01-11 16:59:33 +01:00
Antonio Scandurra cbbba41748 Reuse line layouts when reusing view 2024-01-11 16:57:06 +01:00
Antonio Scandurra 18eaefd0ed Reuse cursor style when reusing a view tree 2024-01-11 15:03:34 +01:00
Antonio Scandurra 50ccdf5c16 Reuse input handler when reusing a view tree 2024-01-11 13:22:59 +01:00
Antonio Scandurra d088ace404 Explicitly push a node in the dispatch tree when painting a new view 2024-01-11 12:48:05 +01:00
Antonio Scandurra 142a8b68c8 Avoid casting view ids to u32
Also, it looks like using a u64 directly doesn't work well with Metal
shaders, so we unpack the u64 into two u32s.
2024-01-11 12:28:48 +01:00
Mikayla 83163a0031 Reverse context arrays in child predicate test 2024-01-10 19:54:39 -08:00
MikaylaandConrad 38396d4281 Add remaining tests
co-authored-by: Conrad <conrad@zed.dev>
2024-01-10 19:39:43 -08:00
Mikayla a5ca58354d Fix first few asserts 2024-01-10 18:26:01 -08:00
Mikayla 1932a298cb Add back ime_key 2024-01-10 16:29:00 -08:00
Antonio Scandurra a4ef1bc096 Rename reuse_geometry to reuse_view 2024-01-10 23:06:10 +01:00
Antonio Scandurra 1c260e6dfd Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/copilot/src/sign_in.rs
#	crates/gpui/src/window.rs
#	crates/workspace/src/pane_group.rs
2024-01-10 22:58:52 +01:00
Mikayla f71a0cddb8 Remove last todos 2024-01-10 12:13:12 -08:00
Mikayla 4bcac68c8c Restore GPUI test 2024-01-10 11:43:52 -08:00
Mikayla 7ef88397c9 Fix seg fault when using the WindowContext::on_window_should_close() API 2024-01-10 11:26:11 -08:00
Mikayla c98d7adf83 Audit all TODOs in Zed and mark port related todos 2024-01-10 11:26:11 -08:00
Max BrunsfeldandAntonio Scandurra 69a93edabd Ensure ArenaRef pointers are aligned to their contained type
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2024-01-10 10:36:08 -08:00
Conrad Irwin 5dff458014 Ensure focus_in and focus_out fire on window activation (#3993)
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows

Release Notes:

- (preview only) vim: fix switching between multiple windows
2024-01-10 10:00:07 -07:00
Antonio Scandurra 2923b71f83 Replace WindowContext::notify with WindowContext::refresh 2024-01-10 17:27:02 +01:00
Marshall Bowers aff119b80a Fix possessive "its" in docs and comments (#3998)
This PR fixes a number of places where we were incorrectly using "it's"
where we needed to use the possessive "its".

Release Notes:

- N/A
2024-01-10 10:09:48 -05:00
Antonio Scandurra d0c101cb6e Reuse depth map entries and retain element states for cached trees 2024-01-10 15:00:40 +01:00
Kirill Bulatov c197ea49ca Simplify uniform list scrolling logic 2024-01-10 13:45:50 +02:00
Kirill BulatovandAntonio Scandurra f57ff1c660 Make the scroll position updated as soon as possible to the correct deferred value
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-10 12:16:06 +02:00
Antonio Scandurra 881c532256 Insert primitives associated with views from a previous scene 2024-01-10 10:50:16 +01:00
Kirill Bulatov 927e0db750 An attempt to defer scrolls during empty initial state 2024-01-10 11:26:23 +02:00
Kirill Bulatov 6809b92e34 Disable synthetic drag on drag and drop
Otherwise, conflicting MouseMove events are generated and page regions start to flicker.
2024-01-10 11:18:45 +02:00
Conrad Irwin 5d3f5611e5 guest promotion (#3969)
Release Notes:

- Adds the ability to promote read-only guests to read-write
participants in calls
2024-01-09 22:21:13 -07:00
Conrad Irwin 2ca462722c Fix some tests (mostly more run_until_parked's...) 2024-01-09 22:14:11 -07:00
Conrad Irwin 72c022f413 Ensure focus-sensitive tests have active windows 2024-01-09 21:38:06 -07:00
Conrad Irwin 1bf33b4b61 Ensure focus_in and focus_out fire on window activation
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows
2024-01-09 20:55:00 -07:00
Mikayla Maki 45baad2825 Remove or fix stale todos (#3990)
The software equivalent of dusting

Release Notes:

-
2024-01-09 18:37:35 -08:00
Mikayla e786e22121 And a few more todos 2024-01-09 16:41:17 -08:00
Mikayla 9ce7ef8949 Remove the last of the major todos 2024-01-09 16:14:54 -08:00
Conrad Irwin 276bfa0fab Merge branch 'main' into guest-promotion 2024-01-09 16:28:42 -07:00
Mikayla ed263a7b5c Resolve more todos 2024-01-09 15:08:05 -08:00
Mikayla 80790d921d Fix / remove small todos 2024-01-09 14:16:46 -08:00
Mikayla Maki 447bfca942 Add a test to catch keybinding bounds issue (#3966)
Add a test to catch regressions to
https://github.com/zed-industries/zed/pull/3964

Thanks for the idea @ConradIrwin 

TODO:

- [ ] Fix immediate stack overflow in test

Release Notes:

- N/A
2024-01-09 12:03:48 -08:00
Mikayla 1728c4eacc Fixed test 2024-01-09 11:52:03 -08:00
Julia 5b1894a9b1 Take into account multiple scroll deltas within a single frame (#3982)
Release Notes:

- Fixed an issue where all but the last scroll event would be dropped if
there were multiple within a single frame.
2024-01-09 14:51:26 -05:00
Marshall Bowers 74dadd68d2 Clean up references in doc comments (#3983)
This PR cleans up a number of references in doc comments so that
`rustdoc` will link and display them correctly.

Release Notes:

- N/A
2024-01-09 14:48:48 -05:00