Compare commits
15 Commits
fix-git-ht
...
v0.142.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7eca9ec9e | ||
|
|
5a2c5d2512 | ||
|
|
7cdf702819 | ||
|
|
34d7f1e345 | ||
|
|
53730e2aaa | ||
|
|
b48cc75fa9 | ||
|
|
071650ff61 | ||
|
|
86183ca65d | ||
|
|
075860d5cd | ||
|
|
67ba048581 | ||
|
|
d5fb290499 | ||
|
|
b01945e1de | ||
|
|
1b0b7fe064 | ||
|
|
985644bacb | ||
|
|
c686c4c800 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -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
2
Cargo.lock
generated
@@ -13550,7 +13550,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zed"
|
||||
version = "0.142.0"
|
||||
version = "0.142.4"
|
||||
dependencies = [
|
||||
"activity_indicator",
|
||||
"anyhow",
|
||||
|
||||
@@ -131,14 +131,7 @@
|
||||
// The default number of lines to expand excerpts in the multibuffer by.
|
||||
"expand_excerpt_lines": 3,
|
||||
// Globs to match against file paths to determine if a file is private.
|
||||
"private_files": [
|
||||
"**/.env*",
|
||||
"**/*.pem",
|
||||
"**/*.key",
|
||||
"**/*.cert",
|
||||
"**/*.crt",
|
||||
"**/secrets.yml"
|
||||
],
|
||||
"private_files": ["**/.env*", "**/*.pem", "**/*.key", "**/*.cert", "**/*.crt", "**/secrets.yml"],
|
||||
// Whether to use additional LSP queries to format (and amend) the code after
|
||||
// every "trigger" symbol input, defined by LSP server capabilities.
|
||||
"use_on_type_format": true,
|
||||
@@ -758,6 +751,11 @@
|
||||
"allowed": true
|
||||
}
|
||||
},
|
||||
"JSONC": {
|
||||
"prettier": {
|
||||
"allowed": true
|
||||
}
|
||||
},
|
||||
"Markdown": {
|
||||
"format_on_save": "off",
|
||||
"prettier": {
|
||||
|
||||
@@ -236,7 +236,7 @@ pub fn preprocess_anthropic_request(request: &mut LanguageModelRequest) {
|
||||
}
|
||||
|
||||
if !system_message.is_empty() {
|
||||
request.messages.insert(
|
||||
new_messages.insert(
|
||||
0,
|
||||
LanguageModelRequestMessage {
|
||||
role: Role::System,
|
||||
|
||||
@@ -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
|
||||
@@ -6809,6 +6812,16 @@ impl Editor {
|
||||
return;
|
||||
}
|
||||
|
||||
if self
|
||||
.context_menu
|
||||
.write()
|
||||
.as_mut()
|
||||
.map(|menu| menu.select_first(self.project.as_ref(), cx))
|
||||
.unwrap_or(false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if matches!(self.mode, EditorMode::SingleLine { .. }) {
|
||||
cx.propagate();
|
||||
return;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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(),
|
||||
})
|
||||
|
||||
@@ -272,6 +272,7 @@ pub enum Event {
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct SerializedOutlinePanel {
|
||||
width: Option<Pixels>,
|
||||
active: Option<bool>,
|
||||
}
|
||||
|
||||
pub fn init_settings(cx: &mut AppContext) {
|
||||
@@ -312,6 +313,7 @@ impl OutlinePanel {
|
||||
if let Some(serialized_panel) = serialized_panel {
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.width = serialized_panel.width.map(|px| px.round());
|
||||
panel.active = serialized_panel.active.unwrap_or(false);
|
||||
cx.notify();
|
||||
});
|
||||
}
|
||||
@@ -407,12 +409,13 @@ impl OutlinePanel {
|
||||
|
||||
fn serialize(&mut self, cx: &mut ViewContext<Self>) {
|
||||
let width = self.width;
|
||||
let active = Some(self.active);
|
||||
self.pending_serialization = cx.background_executor().spawn(
|
||||
async move {
|
||||
KEY_VALUE_STORE
|
||||
.write_kvp(
|
||||
OUTLINE_PANEL_KEY.into(),
|
||||
serde_json::to_string(&SerializedOutlinePanel { width })?,
|
||||
serde_json::to_string(&SerializedOutlinePanel { width, active })?,
|
||||
)
|
||||
.await?;
|
||||
anyhow::Ok(())
|
||||
@@ -2522,7 +2525,7 @@ impl Panel for OutlinePanel {
|
||||
}
|
||||
|
||||
fn starts_open(&self, _: &WindowContext) -> bool {
|
||||
self.active_item.is_some()
|
||||
self.active
|
||||
}
|
||||
|
||||
fn set_active(&mut self, active: bool, cx: &mut ViewContext<Self>) {
|
||||
@@ -2551,6 +2554,7 @@ impl Panel for OutlinePanel {
|
||||
}
|
||||
}
|
||||
}
|
||||
self.serialize(cx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -317,11 +317,14 @@ impl Prettier {
|
||||
})
|
||||
.collect();
|
||||
|
||||
let prettier_parser = prettier_settings.parser.as_deref().or_else(|| buffer_language.and_then(|language| language.prettier_parser_name()));
|
||||
let mut prettier_parser = prettier_settings.parser.as_deref();
|
||||
if buffer_path.is_none() {
|
||||
prettier_parser = prettier_parser.or_else(|| buffer_language.and_then(|language| language.prettier_parser_name()));
|
||||
if prettier_parser.is_none() {
|
||||
log::error!("Formatting unsaved file with prettier failed. No prettier parser configured for language {buffer_language:?}");
|
||||
return Err(anyhow!("Cannot determine prettier parser for unsaved file"));
|
||||
}
|
||||
|
||||
if prettier_parser.is_none() && buffer_path.is_none() {
|
||||
log::error!("Formatting unsaved file with prettier failed. No prettier parser configured for language {buffer_language:?}");
|
||||
return Err(anyhow!("Cannot determine prettier parser for unsaved file"));
|
||||
}
|
||||
|
||||
log::debug!(
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
description = "The fast, collaborative code editor."
|
||||
edition = "2021"
|
||||
name = "zed"
|
||||
version = "0.142.0"
|
||||
version = "0.142.4"
|
||||
publish = false
|
||||
license = "GPL-3.0-or-later"
|
||||
authors = ["Zed Team <hi@zed.dev>"]
|
||||
|
||||
@@ -1 +1 @@
|
||||
dev
|
||||
stable
|
||||
Reference in New Issue
Block a user