cbf960e
Windows: make `fs` to use workspace `windows` crate (#9350)
Click to expand commit body
Release Notes: - N/A
张小白 created
cbf960e
Windows: make `fs` to use workspace `windows` crate (#9350)
Release Notes: - N/A
张小白 created
a183c33
Prevent long extension descriptions from overflowing (#9348)
This PR fixes an issue where long extension descriptions could take up more room than intended, pushing the GitHub repository icon off the screen. <img width="901" alt="Screenshot 2024-03-14 at 12 54 14 PM" src="https://github.com/zed-industries/zed/assets/1486634/befce468-f8df-4183-b3cc-9d088dd53b4e"> Fixes #9331. Release Notes: - Fixed an issue where long extension descriptions could push the GitHub repository icon off the screen ([#9331](https://github.com/zed-industries/zed/issues/9331)).
Marshall Bowers created
3610b07
Restore `--all-targets` for clippy (#9346)
This PR restores the `--all-targets` flag when running `cargo clippy`. Without it, there are areas that Clippy does not check, as evidenced by the violations that were caught once the flag was re-added. Release Notes: - N/A
Marshall Bowers created
5f02ef7
fs: Remove unused import (#9344)
Followup to #9341 as I've noticed a CI failure on bundling step of my other PR (https://github.com/zed-industries/zed/actions/runs/8283419386/job/22666698264) Release Notes: - N/A
Piotr Osiewicz created
fab5548
Fix project search filtering on projects with multiple worktrees (#9337)
Fixes #9285 Release Notes: - Fixed a bug that broke search filtering when searching a project with multiple worktrees ([#9285](https://github.com/zed-industries/zed/issues/9285)). --------- Co-authored-by: Thorsten <thorsten@zed.dev>
Antonio Scandurra and Thorsten created
7629c16
Always read files to string on a background thread (#9341)
We noticed that when you open a lot of files (i.e. project-wide search with multi-buffer) that the main thread can become unresponsive, because while we are async, we still load these files on the main thread. What this change does is it uses `smol::unblock` to load files on a different thread. Release Notes: - Improved responsiveness when loading files into memory. Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Kirill <kirill@zed.dev>
Thorsten Ball , Antonio , and Kirill created
c015baa
Do not start searching if query is empty (#9333)
This avoids the problem of a search being kicked off involuntarily and potentially using a large amount of CPU when toggling on the `Search Ignored Files` option. What would happen is that someone would turn the option on, we'd kick off a search, and go through all of the files in, say, `node_modules`. Even if no query was given. This avoids that. Release Notes: - Fixed an empty search being kicked off involuntarily if no query was typed in yet but an option was toggled.
Thorsten Ball created
f142568
Allow navigating back to multibuffers (#9334)
Fixes https://github.com/orgs/zed-industries/projects/14/views/1?pane=issue&itemId=56263346 Fixes a state where Zed multi buffers were not reachable after going to an excerpt inside it (with alt-enter). I suspect, we will have to come back to multi buffer history and check the way it behaves on inner excerpts clicking, but now this change seems to restore the main thing: multi buffers not being shown in the history at all. Release Notes: - Fixes "go backwards" not considering multibuffers in history
Kirill Bulatov created
b795b0e
editor: Do not autoindent on line removals in vim mode. (#9332)
Fixes #8942 Release Notes: - Fixed overeager auto-indentation on line removals in Vim mode.
Piotr Osiewicz created
51261c5
Fix double-clicking titlebar to zoom (#9323)
Fixes https://github.com/zed-industries/zed/issues/9300 This was a regression caused by not inserting a hitbox when a div only had click listeners on it. Release Notes: - Fixed a regression that disabled double-clicking on the titlebar to zoom the window. ([#9300](https://github.com/zed-industries/zed/issues/9300)) (preview-only)
Antonio Scandurra created
bffde43
Improve vim undo (#9317)
The important change here is to ensure that undo never lands you in visual mode; but we also take care to restore the selection the same way vim does (visual line goes to beginning of line, visual block to the top left, etc.). To help make this behaviour feel right we also group any deletions that started insert mode with the first text inserted. Fixes: #7521 Release Notes: - vim: Improved undo. It will now restore you to normal mode in the same position as vim, and group deletions caused by `c` or `s` with the concomitant insert. ([#7521](https://github.com/zed-industries/zed/issues/7521)).
Conrad Irwin created
6ae5274
Scrollbar markers enhancements (#9080)
Several improvements in how various markers are displayed in the editor scrollbar, as described in #9070, if you're ok with the proposal: - Scrollbar has three columns: - 1st is for git markers - 2nd is for selections and search resulta highlightings - 3rd is for diagnostics - Height of all markers is scaled, but there's a minimal allowed height of 2px. - Right border removed from both the scrollbar and thumb to make more room for markers. Release Notes: - Improved scrollbar markers visualization (#9070).
Andrew Lygin created
b65aa7e
Fix accidental leak of text stack between frames (#9297)
Co-Authored-By: Max <max@zed.dev> Co-Authored-By: Marshall <marshall@zed.dev> Release Notes: - Fixed a bug where text styles could leak between frames (preview only) Co-authored-by: Max <max@zed.dev> Co-authored-by: Marshall <marshall@zed.dev>
Conrad Irwin , Max , and Marshall created
3274cc9
Windows: impl `WindowsDisplay` (#9287)
Tested on my laptop, and I've noticed that when I move the window, `WindowsPlatform::displays()` is being continuously called. Is this intended? Release Notes: - N/A
张小白 created
36cbfbf
windows: Better keyboard input support (#9180)
### Description
Currently, there are some issues with input handling on Windows:
#### 1. Direct crash when encountering IME input.
https://github.com/zed-industries/zed/assets/14981363/598f7272-1948-4a42-99c5-2ef7b9162a1e
#### 2. Handling messages every 1/60 seconds in the main thread. Despite
being named "immediate_handle," it's not exactly immediate.
```rust
// actually halt here
let wait_result =
unsafe { DCompositionWaitForCompositorClock(Some(&[self.inner.event]), INFINITE) };
// compositor clock ticked so we should draw a frame
if wait_result == 1 {
unsafe { invalidate_thread_windows(GetCurrentThreadId()) };
while unsafe { PeekMessageW(&mut msg, HWND::default(), 0, 0, PM_REMOVE) }.as_bool()
```
#### 3. According to Windows recommendations, character input should be
obtained using `WM_CHAR` instead of `WM_KEYDOWN`. Additionally, there
are problems with the handling within `WM_CHAR`.
```rust
fn handle_char_msg(&self, wparam: WPARAM) -> LRESULT {
let mut callbacks = self.callbacks.borrow_mut();
if let Some(callback) = callbacks.input.as_mut() {
let modifiers = self.current_modifiers();
let msg_char = wparam.0 as u8 as char; // these are u16 chars, cant treat them as u8
```
And, we don't handle `WM_SYSKEYDOWN` properly, which leads to `Alt + F4`
not working.
Release Notes:
- N/A
张小白 created
2abb5ae
Fix crash when launching `Zed.exe` directly from `target/debug` dir (#9112)
As I described in #9111 , the PR fixs this crash. Release Notes: - N/A
张小白 created
a56a260
Add ability to specify binary path/args for rust-analyzer (#9293)
This fixes #9292 by adding a section to the language server settings
that allows users to specify the binary path and arguments with which to
start up a language server.
Example user settings for `rust-analyzer`:
```json
{
"lsp": {
"rust-analyzer": {
"binary": {
"path": "/Users/thorstenball/tmp/rust-analyzer-aarch64-apple-darwin",
"arguments": ["--no-log-buffering"]
}
}
}
}
```
Constraints:
* Right now this only allows ABSOLUTE paths.
* This is only used by `rust-analyzer` integration right now, but the
setting can be used for other language servers. We just need to update
the adapters to also respect that setting.
Release Notes:
- Added ability to specify `rust-analyzer` binary `path` (must be
absolute) and `arguments` in user settings. Example: `{"lsp":
{"rust-analyzer": {"binary": {"path": "/my/abs/path/rust-analyzer",
"arguments": ["--no-log-buffering"] }}}}`
([#9292](https://github.com/zed-industries/zed/issues/9292)).
Co-authored-by: Ricard Mallafre <rikitzzz@gmail.com>
Thorsten Ball and Ricard Mallafre created
6655b96
k8s syntax
Conrad Irwin created
724c19a
Add a setting for custom associations between languages and files (#9290)
Closes #5178
Release Notes:
- Added a `file_types` setting that can be used to associate languages
with file names and file extensions. For example, to interpret all `.c`
files as C++, and files called `MyLockFile` as TOML, add the following
to `settings.json`:
```json
{
"file_types": {
"C++": ["c"],
"TOML": ["MyLockFile"]
}
}
```
As with most zed settings, this can be configured on a per-directory
basis by including a local `.zed/settings.json` file in that directory.
---------
Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld and Marshall created
77de568
Allow setting a channel for new users to auto-join (#9291)
Release Notes: - Automatically add new users to the #zed channel
Conrad Irwin created
88e33a1
Account for all hover heights & prevent un-hover between popovers (#9257)
Fixes https://github.com/zed-industries/zed/issues/5227 Fixes https://github.com/zed-industries/zed/issues/7304 Release Notes: - Fixed an issue where not all editor hover popovers would be accounted for when choosing to hover above or below the mouse cursor ([#5227](https://github.com/zed-industries/zed/issues/5227)). - Fixed an issue where editor hover could be dismissed by moving the mouse between hover popovers ([#7304](https://github.com/zed-industries/zed/issues/7304)). Co-authored-by: Antonio Scandurra <antonio@zed.dev>
Julia and Antonio Scandurra created
139bb32
Automatically reset cursor style when hit test changes (#9289)
Release Notes: - N/A Co-authored-by: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
7f0e373
v0.128.x dev
Joseph T. Lyons created
6286d86
Set the correct dispatch action for the double-click handler for the pane tab bar (#9221)
Fixes #9003 Release Notes: - Fixed the double-click action on the terminal tab bar opening a new buffer instead of a new terminal ([#9003](https://github.com/zed-industries/zed/issues/9003)).
Igal Tabachnik created
fc9f844
Always stop propagation in div's scroll wheel listener (#9282)
Fixes #9274 This fixes a bug that was preventing the editor hover popovers from being scrolled with the trackpad. Release Notes: - N/A
Antonio Scandurra created
1094827
Omit `.git` worktree indexing (#9281)
Closes https://github.com/zed-industries/zed/issues/9174 Release Notes: - Fixed panics when `.git` was opened as a Zed worktree ([9174](https://github.com/zed-industries/zed/issues/9174))
Kirill Bulatov created
572ba3f
Fall back to FindAllReferences if cmd-click did not preform GoToDefinition elsewhere (#9243)
Kirill Bulatov created
427d669
gpui: Do not emit MouseUpEvent when exiting drag & drop (#9273)
Fixes #9198 Release Notes: - Fixed a bug where empty panes could be created during drag & drop.
Piotr Osiewicz created
ac4bbb6
Correctly re-render mouse cursor when hovering over pane group divider (#9270)
Before this change, the hitbox felt one-sided because the cursor didn't consistently change into the drag-handle cursor. The reason was that we didn't trigger a redraw on hover, so we'd only change the cursor if we detected hover AND something else caused a redraw. Release Notes: - Fixed the pane resize handler not consistently triggering on mouse hover. Co-authored-by: Antonio <antonio@zed.dev>
Thorsten Ball and Antonio created
754df93
Fix segfault when dropping MacWindow (#9267)
This avoids calling `window.setDelegate(nil)` when the window was already closed. Release Notes: - Fixed a segfault that could show up when closing windows. Co-authored-by: Antonio <antonio@zed.dev>
Thorsten Ball and Antonio created
3c28282
Redraw when toggling between windows (#9236)
Before this change we didn't consistently trigger focus events when toggling between with windows `Cmd-backtick`. We only triggered them when the OS decided to trigger a redraw. That lead to a nasty bug that showed up in Vim mode where a cursor would still be active in the hidden window, even though it was deactivated. One then had to manually try to trigger a focus event in the new window to activate the cursor. With this change, we call `cx.refresh` when the window activation status changed which triggers focus events consistently and fixes this bug. With logging we can observe this: **BEFORE**: https://github.com/zed-industries/zed/assets/1185253/e1ad8878-129c-44ba-9d8b-c720f9dca5b6 **AFTER**: https://github.com/zed-industries/zed/assets/1185253/733fdadb-d1ea-47fe-a2c1-7b50af299cc0 Release Notes: - Fixed focus not being consistently changed when switching between multiple Zed windows via `Cmd-backtick`. --------- Co-authored-by: Manu Raj <git@manuraj.dev> Co-authored-by: Antonio <antonio@zed.dev>
Thorsten Ball , Manu Raj , and Antonio created
80b80df
gpui: Switch to `x11rb` (#9113)
Switch to using `x11rb` crate instead of current `xcb` crate for gpui's x11 platform. Also fixes the crash on resize, and white flashing on resize. Release Notes: - N/A --------- Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Rajesh Malviya and Mikayla Maki created
47afc70
Update Lua config.toml (#9260)
Release Notes: - Added autoclosing of `(` and `'` in Lua.
Joseph T. Lyons created
646f695
Allow opening non-extant files (#9256)
Fixes #7400 Release Notes: - Improved the `zed` command to not create files until you save them in the editor ([#7400](https://github.com/zed-industries/zed/issues/7400)).
Conrad Irwin created
e792c1a
Open new windows with a default size and position (#9204)
This PR changes GPUI to open windows with a default size and location, and to otherwise inherit from their spawning window. Note: The linux build now crashes on startup. Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Ezekiel Warren <zaucy@users.noreply.github.com>
Mikayla Maki , Nathan , and Ezekiel Warren created
9a2dcee
windows: Support dropping targets with filenames longer than 260 characters (#9115)
use `Vec` instead of slice to support dynamic filename length. Release Notes: - N/A
张小白 created
fb83cf2
notification panel: rework time formatting (#8997)
Follow up of #7994 to rework the notification panel timestamps. This PR also includes some of the changes @evrsen proposed in #8996 Here is what it looks like now: https://github.com/zed-industries/zed/assets/53836821/d85450e7-eab6-4fe7-bd11-1d76c0e87258 Release Notes: - Reworked date time formatting in the chat and the notification panel - Added hover style to notifications and hovering tooltip on timestamps --------- Co-authored-by: Evren Sen <146845123+evrsen@users.noreply.github.com>
Bennet Bo Fenner and Evren Sen created
a105b5f
Wayland: Remove bogus `wl_surface::commit`s on resize (with integer scaling) (#9245)
Release Notes: - N/A This prevents a crash on sway (on older versions without fractional scaling). This means the resize is delayed until the next this we present a frame, we need to investigate if this is the correct this to do.
bbb651 created
aeb2a98
chore: Move new util deps to workspace level (#9250)
I've missed a comment from @maxdeviant on #9247 before hitting merge; mea culpa Release Notes: - N/A
Piotr Osiewicz created
34f09ba
chore: Clean up util dependencies. (#9247)
This allows this crate to start building sooner + it reduces our total build graph size by 13 units (1104 -> 1091). Release Notes: - N.A
Piotr Osiewicz created
c09fe1c
Do not allow concurrent FindAllReferences requests for the same multibuffer anchors (#9242)
FindAllReferences LSP requests might take a long time to complete, and currently Zed allows multiple requests spawned concurrently for the same Anchor in the multi buffer. That results in multiple search results' multi buffers appearing, sometimes at once, which is not what we want. Part of https://github.com/zed-industries/zed/issues/5351 that helps to reduce the amount of search results after clicks that did not resolve instantly. Release Notes: - Improved FindAllReferences action by not allowing concurrent requests for the same multi buffer source
Kirill Bulatov created
64219ba
When fetching extensions from blob store, don't halt on invalid extensions. (#9241)
This fixes an error where we were failing to sync extensions from the blob store because of the presence of one invalid extensions (`gentle-dark`), which was missing the `authors` field in its manifest. Release Notes: - N/A Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld and Marshall created
05dfe96
Add --add/--new to control CLI behaviour (#9202)
When neither is specified, if you open a directory you get a new workspace, otherwise files are added to your existing workspace. With --new files are always opened in a new workspace With --add directories are always added to an existing workspace Fixes #9076 Fixes #4861 Fixes #5370 Release Notes: - Added `-n/--new` and `-a/--add` to the zed CLI. When neither is specified, if you open a directory you get a new workspace, otherwise files are added to your existing workspace. With `--new` files are always opened in a new workspace, with `--add` directories are always added to an existing workspace. ([#9076](https://github.com/zed-industries/zed/issues/9096), [#4861](https://github.com/zed-industries/zed/issues/4861), [#5370](https://github.com/zed-industries/zed/issues/5370)).
Conrad Irwin created
89c67fb
Fix typos in default `settings.json` (#9239)
This PR fixes some typos in the comments within the default `settings.json` file. Fixes #4257. Release Notes: - Fixed some incorrect comments in the default `settings.json` file ([#4257](https://github.com/zed-industries/zed/issues/4257)).
Marshall Bowers created
41d8ba1
Remove wezterm fork from dependencie (#8998)
Improves build time by removing wezterm dependency ([#8604](https://github.com/zed-industries/zed/issues/8604)). Release Notes: - N/A
dalton-oliveira created
e7289c3
Correctly show the `shift` icon for keybindings on macOS (#9235)
Release Notes: - N/A Co-authored-by: Nathan <nathan@zed.dev>
Antonio Scandurra and Nathan created
ece0fb5
Rosé Pine: Change `#f5c177` to `#f6c177` (#9232)
As discussed in #themes-and-ui Release Notes: - N/A
Kainoa Kanter created
8c87b34
Show formatting failure (#9229)
This fixes #8072 and #9061 by surfacing formatting errors in the activity indicator. It shows a message in the activity indicator if the last attempt to format a buffer failed. It only keeps track of the last attempt, so any further formatting that succeeds will reset or update the error message. I chose to only keep track of that, because everything else (keeping track of formatting state per buffer, per project, per worktree) seems complicated with little benefit, since we'd have to keep track of that state, update it, clean it, etc. We can still do that should we decide that we need to keep track of the state on a per-buffer basis, but I think for now this is a good, simple solution. This also changes the `OpenLog` action to scroll to the end of the buffer and to not mark the buffer as dirty. Release Notes: - Added message to activity indicator if last attempt to format a buffer failed. Message will get reset when next formatting succeeds. Clicking on message opens log with more information. ([#8072](https://github.com/zed-industries/zed/issues/8072) and [#9061](https://github.com/zed-industries/zed/issues/9061)). - Changed `zed: Open Log` action to not mark the opened log file as dirty and to always scroll to the bottom of the log. https://github.com/zed-industries/zed/assets/1185253/951fb9ac-8b8b-483a-a46d-712e52878a4d
Thorsten Ball created
39a0841
Center dock resize handle hitboxes (#9225)
Also, add a `deferred` function which takes an element to paint after the current element tree. Release Notes: - Improved the size and position of the hitbox for resizing left, right, and bottom panels. ([#8855](https://github.com/zed-industries/zed/issues/8855)) Co-authored-by: Julia <julia@zed.dev> Co-authored-by: Nathan <nathan@zed.dev>
Antonio Scandurra , Julia , and Nathan created
409aa51
Fix mouse interactions with the project and branch switchers (#9222)
Previously, we were considering the mouse to be "out" of a div when its hitbox wasn't hovered. However, if a parent listened for "mouse_down_out" and a child occluded the parent, the parent would always think the mouse was out even when the user clicked the child. This commit changes the definition of "mouse out" to simply mean "does not contain the point", without accounting for occlusion. Release Notes: - N/A Co-authored-by: Julia <julia@zed.dev>
Antonio Scandurra and Julia created