Compare commits

...

8 Commits

Author SHA1 Message Date
Zed Bot
86183ca65d Bump to 0.142.2 for @ConradIrwin 2024-06-27 16:00:52 -07:00
gcp-cherry-pick-bot[bot]
075860d5cd Fix multi-keystroke shortcuts better (cherry-pick #13612) (#13614)
Cherry-picked Fix multi-keystroke shortcuts better (#13612)

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-27 16:55:22 -06:00
gcp-cherry-pick-bot[bot]
67ba048581 Fix multi-key shortcuts (cherry-pick #13606) (#13607)
Cherry-picked Fix multi-key shortcuts (#13606)

Broken by the shift shift support PR

Release Notes:

- Fix multi-key shortcuts (preview only)

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-27 15:32:57 -06:00
Peter Tripp
d5fb290499 Release notes upload fix (#13560)
- Action for release notes upload (softprops/action-gh-release) configured with incorrect key. 
- Valid keys here: https://github.com/softprops/action-gh-release?tab=readme-ov-file#-customizing
2024-06-27 14:40:28 -06:00
gcp-cherry-pick-bot[bot]
b01945e1de fix panics (cherry-pick #13554) (#13558)
Cherry-picked fix panics (#13554)

Release Notes:

- Fixed a panic when editing HTML near the end of a file
- Fixed a panic when editing settings.json from inside the .zed
directory

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-26 16:27:45 -06:00
Peter Tripp
1b0b7fe064 zed 0.142.1 2024-06-26 16:23:22 -04:00
Piotr Osiewicz
985644bacb json: Fix package-version-server referencing the wrong path to the binary (#13555)
We were trying to access the binary at
package-version-server-{VERSION}/package-version-server, whereas the
binary itself is placed at package-version-server-{VERSION}

Release Notes:

- Fixed package.json language server failing to start.

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-06-26 16:21:51 -04:00
Peter Tripp
c686c4c800 v0.142.x preview 2024-06-26 12:19:49 -04:00
8 changed files with 36 additions and 21 deletions

View File

@@ -254,7 +254,7 @@ jobs:
target/aarch64-apple-darwin/release/Zed-aarch64.dmg
target/x86_64-apple-darwin/release/Zed-x86_64.dmg
target/release/Zed.dmg
body_file: target/release-notes.md
body_path: target/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
Cargo.lock generated
View File

@@ -13550,7 +13550,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.142.0"
version = "0.142.2"
dependencies = [
"activity_indicator",
"anyhow",

View File

@@ -2914,6 +2914,9 @@ impl Editor {
let start_offset = TO::to_offset(&range.start, &buffer_snapshot);
let end_offset = start_offset + end_difference;
let start_offset = start_offset + start_difference;
if start_offset > buffer_snapshot.len() || end_offset > buffer_snapshot.len() {
continue;
}
let start = buffer_snapshot.anchor_after(start_offset);
let end = buffer_snapshot.anchor_after(end_offset);
linked_edits

View File

@@ -549,11 +549,17 @@ pub struct Window {
pub(crate) focus: Option<FocusId>,
focus_enabled: bool,
pending_input: Option<PendingInput>,
pending_modifiers: Option<Modifiers>,
pending_modifier: ModifierState,
pending_input_observers: SubscriberSet<(), AnyObserver>,
prompt: Option<RenderablePromptHandle>,
}
#[derive(Clone, Debug, Default)]
struct ModifierState {
modifiers: Modifiers,
saw_keystroke: bool,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub(crate) enum DrawPhase {
None,
@@ -824,7 +830,7 @@ impl Window {
focus: None,
focus_enabled: true,
pending_input: None,
pending_modifiers: None,
pending_modifier: ModifierState::default(),
pending_input_observers: SubscriberSet::new(),
prompt: None,
})
@@ -3168,9 +3174,12 @@ impl<'a> WindowContext<'a> {
let mut keystroke: Option<Keystroke> = None;
if let Some(event) = event.downcast_ref::<ModifiersChangedEvent>() {
if let Some(previous) = self.window.pending_modifiers.take() {
if event.modifiers.number_of_modifiers() == 0
&& self.window.pending_modifier.modifiers.number_of_modifiers() == 1
&& !self.window.pending_modifier.saw_keystroke
{
if event.modifiers.number_of_modifiers() == 0 {
let key = match previous {
let key = match self.window.pending_modifier.modifiers {
modifiers if modifiers.shift => Some("shift"),
modifiers if modifiers.control => Some("control"),
modifiers if modifiers.alt => Some("alt"),
@@ -3198,17 +3207,15 @@ impl<'a> WindowContext<'a> {
pending = pending_bindings;
}
}
} else if event.modifiers.number_of_modifiers() == 1 {
self.window.pending_modifiers = Some(event.modifiers);
}
if keystroke.is_none() {
self.finish_dispatch_key_event(event, dispatch_path);
return;
if self.window.pending_modifier.modifiers.number_of_modifiers() == 0
&& event.modifiers.number_of_modifiers() == 1
{
self.window.pending_modifier.saw_keystroke = false
}
}
if let Some(key_down_event) = event.downcast_ref::<KeyDownEvent>() {
self.window.pending_modifiers.take();
self.window.pending_modifier.modifiers = event.modifiers
} else if let Some(key_down_event) = event.downcast_ref::<KeyDownEvent>() {
self.window.pending_modifier.saw_keystroke = true;
let KeymatchResult {
bindings: key_down_bindings,
pending: key_down_pending,
@@ -3224,6 +3231,11 @@ impl<'a> WindowContext<'a> {
pending = key_down_pending;
}
if keystroke.is_none() {
self.finish_dispatch_key_event(event, dispatch_path);
return;
}
if pending {
let mut currently_pending = self.window.pending_input.take().unwrap_or_default();
if currently_pending.focus.is_some() && currently_pending.focus != self.window.focus {

View File

@@ -348,7 +348,7 @@ impl LspAdapter for NodeVersionAdapter {
}
Ok(LanguageServerBinary {
path: destination_path.join("package-version-server"),
path: destination_path,
env: None,
arguments: Default::default(),
})

View File

@@ -8192,7 +8192,7 @@ impl Project {
}
};
if abs_path.ends_with(local_settings_file_relative_path()) {
if path.ends_with(local_settings_file_relative_path()) {
let settings_dir = Arc::from(
path.ancestors()
.nth(local_settings_file_relative_path().components().count())
@@ -8209,7 +8209,7 @@ impl Project {
},
)
});
} else if abs_path.ends_with(local_tasks_file_relative_path()) {
} else if path.ends_with(local_tasks_file_relative_path()) {
self.task_inventory().update(cx, |task_inventory, cx| {
if removed {
task_inventory.remove_local_static_source(&abs_path);
@@ -8229,7 +8229,7 @@ impl Project {
);
}
})
} else if abs_path.ends_with(local_vscode_tasks_file_relative_path()) {
} else if path.ends_with(local_vscode_tasks_file_relative_path()) {
self.task_inventory().update(cx, |task_inventory, cx| {
if removed {
task_inventory.remove_local_static_source(&abs_path);

View File

@@ -2,7 +2,7 @@
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.142.0"
version = "0.142.2"
publish = false
license = "GPL-3.0-or-later"
authors = ["Zed Team <hi@zed.dev>"]

View File

@@ -1 +1 @@
dev
preview