Commit log

40030f3 Fix two mouse event bugs (#2835)

Click to expand commit body
This PR fixes two bugs we discovered in Zed's mouse event handling while
investigating an interesting and mysterious bug we we were seeing, where
spurious `MouseMoved` events would continuously be dispatched after
control-clicking.

Release Notes:

- Fixed a rendering glitch that could occur after control-clicking
certain elements.

Mikayla Maki created

a5cb4c6 Fix selections and enter-to-create-file

Mikayla created

6cc0b81 Add `ui_sans` as a font option in the theme (#2836)

Click to expand commit body
This adds IBM Plex as a font option available to use as `ui_sans`

Note: This PR adds a static list of accepted font types in `/font`, as
LICENSE files were causing the app to crash when Zed was trying to load
them as fonts.

Release Notes:

- N/A (No user facing changes)

Thanks @ForLoveOfCats for getting me unstuck ❤️

Nate Butler created

85af025 Add IBM Plex license

Nate Butler created

af388e7 Only load TTF fonts for now, additional font types will need to be manually added

Click to expand commit body
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>

Nate Butler and Julia created

183c292 Remove license causing unwrap error

Click to expand commit body
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>

Nate Butler and Julia created

b23f1c8 WIP add IBM Plex Sans

Click to expand commit body
(base) natebutler@Nate16 zed % cargo run
   Compiling zed v0.99.0 (/Users/natebutler/Code/zed/zed/crates/zed)
    Finished dev [unoptimized + debuginfo] target(s) in 9.15s
     Running `target/debug/Zed`
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: parse error" at crates/zed/src/main.rs:667:10
   0: backtrace::backtrace::libunwind::trace
             at /Users/natebutler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5
      backtrace::backtrace::trace_unsynchronized
             at /Users/natebutler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5
   1: backtrace::backtrace::trace
             at /Users/natebutler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14
   2: backtrace::capture::Backtrace::create
             at /Users/natebutler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9
   3: backtrace::capture::Backtrace::new
             at /Users/natebutler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22
   4: Zed::init_panic_hook::{{closure}}
             at crates/zed/src/main.rs:436:29
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::begin_panic_handler::{{closure}}
   7: std::sys_common::backtrace::__rust_end_short_backtrace
   8: _rust_begin_unwind
   9: core::panicking::panic_fmt
  10: core::result::unwrap_failed
  11: core::result::Result<T,E>::unwrap
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/result.rs:1089:23
  12: Zed::load_embedded_fonts
             at crates/zed/src/main.rs:664:5
  13: Zed::main
             at crates/zed/src/main.rs:80:5
  14: core::ops::function::FnOnce::call_once
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/ops/function.rs:250:5
  15: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/sys_common/backtrace.rs:134:18
  16: std::rt::lang_start::{{closure}}
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/rt.rs:166:18
  17: std::panicking::try
  18: std::rt::lang_start_internal
  19: std::rt::lang_start
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/rt.rs:165:17
  20: _mai

Nate Butler created

8ed5e8f Pass PaintContext to Element::paint (#2788)

Click to expand commit body
I want to use this on another branch, but it's a sweeping change, so
this prepares the ground for it. This can always be reverted if it
doesn't work out.

Nathan Sobo created

bed0d1d Fix language detection when file name begins with a `.` (#2833)

Click to expand commit body
I went to add in `zprofile` to the bash language config to get syntax
highlighting for it. After adding it in, Zed was still not highlighting
the file. I checked and saw that we are using `Path::extension()` in
`language_for_file()`, which [returns `None` when a file's name begins
with a
`.`](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.extension),
such as in the case of `.zprofile`. This PR adds a custom method, with
some tests, that just tries to grab the last component in the file name
if `Path::extension` returns `None`. Not sure if `ext` is the best name,
but I can't use `extension`.

Maybe this method should be called `extension_or_hidden_file_name()`?

Release Notes:

- Fixed a bug where language detection would fail for files starting
with `.` in their names.
- Added syntax highlighting for `.zprofile` files

Joseph T. Lyons created

c523ccc Fix code that identifies language via extension

Joseph T. Lyons created

2605ae1 Use Arc::make_mut in ChannelStore

Click to expand commit body
Co-authored-by: Mikayla <mikayla@zed.dev>

Max Brunsfeld and Mikayla created

0b93a30 Terminate synthetic drag state on mouse up w/ ctrl held

Click to expand commit body
Co-authored-by: Mikayla <mikayla@zed.dev>

Max Brunsfeld and Mikayla created

e3bb5e5 Fix failure to remove hovered region_ids on element removal

Click to expand commit body
Co-authored-by: Mikayla <mikayla@zed.dev>

Max Brunsfeld and Mikayla created

db96fb1 Merge remote-tracking branch 'origin/main' into paint-context

Nathan Sobo created

54ca5f1 Replace context methods that take a window id with methods on window handles (#2832)

Click to expand commit body
With this PR, I've eliminated almost all references to window ids
outside of the internals of GPUI. All public methods taking these ids
are now defined on `AnyWindowHandle`, which provides a more coherent
narrative around windows as a concept.

Nathan Sobo created

0dc70e6 Rename mac platform Window to MacWindow for clarity

Nathan Sobo created

fc96676 Use AppContext::update when updating windows so we handle effects

Nathan Sobo created

8e49d14 Minimize window id usage

Nathan Sobo created

afd89b2 Store AnyWindowHandles instead of usizes

Nathan Sobo created

bbe4a9b Position and style the channel editor correctly

Click to expand commit body
Fix a bug where some channel updates would be lost
Add channel name sanitization before storing in the database

Mikayla created

b708824 Position and style the channel editor correctly

Click to expand commit body
Fix a bug where some channel updates would be lost
Add channel name sanitization before storing in the database

Mikayla created

c96b03a Piotr/optimize search selections with a limit (#2831)

Click to expand commit body
/cc @nathansobo @maxbrunsfeld 

Release Notes:
- Fixed scrollbar selections causing noticeable slowdowns with large
quantities of selections.

Piotr Osiewicz created

d00f6a4 Fix a bug where channel invitations would show up in the channels section

Click to expand commit body
Block non-members from reading channel information
WIP: Make sure Arc::make_mut() works

Mikayla created

6a7245b Fix positioning on face piles, fix panic on member invite removal

Mikayla created

1e8a9cc Merge remote-tracking branch 'origin/main' into window-handles

Nathan Sobo created

b77c336 Return window handles from WeakItemHandle

Nathan Sobo created

b2d9ccc Move more window methods off AsyncAppContext

Nathan Sobo created

95cd96e Move debug_elements to AnyWindowHandle

Nathan Sobo created

4f10f0e Remove window methods from AsyncAppContext

Nathan Sobo created

1fd80ba Remove AsyncAppContext::remove_window

Nathan Sobo created

fe6a188 Remove unused dock code

Nathan Sobo created

0a4633f Remove more window id usage

Nathan Sobo created

da7dc9c Work with window handles instead of ids in drag code

Nathan Sobo created

d896d89 Store an AnyWindowHandle in WindowContext

Nathan Sobo created

17c9b4c Fix tests

Mikayla created

662e196 Calculate the range for each color family in a theme (#2738)

Click to expand commit body
Release Notes:
- N/A (Internal theme stuff)

Nate Butler created

49f1f1c Remove window when closing workspace in test

Nathan Sobo created

1aff642 Do not highlgiht selections at all over the threshold

Piotr Osiewicz created

dba2fac Remove window via handles

Nathan Sobo created

f0da6b0 Remove TestAppContext::add_view

Click to expand commit body
Instead, we now call this on window handles.

Nathan Sobo created

0f33223 Remove unused method

Nathan Sobo created

d687c3d Merge remote-tracking branch 'origin/main' into window-handles

Nathan Sobo created

f2be318 Move window-related methods from TestAppContext to AnyWindowHandle

Nathan Sobo created

0197d49 Move activation simulation to AnyWindowHandle

Nathan Sobo created

486f5bc Get compiling

Nathan Sobo created

2999063 Change collab panel icon

Max Brunsfeld created

371c669 Address review feedback.

Click to expand commit body
Rename selected_rows to background_highlight_row_ranges.
Do not return any ranges if there are more than 50k results

Piotr Osiewicz created

b0fc6da Use display maps

Piotr Osiewicz created

241d395 Remove redundant argument

Piotr Osiewicz created

42e1221 Add upper bound limit. Remove dbg! statements

Piotr Osiewicz created