Compare commits

...

8 Commits

Author SHA1 Message Date
Peter Tripp
3e609e4793 v0.141.x stable 2024-06-26 12:19:49 -04:00
Joseph T. Lyons
fce2e00745 Add metrics_id to editor_events (#13525)
Release Notes:

- N/A
2024-06-26 11:37:56 -04:00
Zed Bot
20edf6905c Bump to 0.141.2 for @osiewicz 2024-06-23 10:08:17 -07:00
Piotr Osiewicz
d3c2699b1e editor: Select first match in "Find all references" editor (#13424)
Previously we've placed cursor on the first line of the first excerpt in
the multibuffer, but alas,
https://x.com/fasterthanlime/status/1804883499809165473 happened (j/k,
this feedback is totally valid) and now we're gonna place it at the end
of the first reference. As a bonus, with the old configuration `editor:
select next` tripped over itself. Now it's possible (& feasible) to do a
"select next" in "find all references"; consecutive referenced ranges
will be selected.

Fixes #13419



Release Notes:

- Fixed a bug where "Find all references" editor had cursor placed on
the first line of the first excerpt in the multibuffer instead of having
it on the first reference.
2024-06-23 19:07:08 +02:00
gcp-cherry-pick-bot[bot]
fbeaa70e97 Fix: Picker select_last not scrolling to item index (cherry-pick #13393) (#13410)
Cherry-picked Fix: Picker select_last not scrolling to item index
(#13393)

Release Notes:

- Fix: Command palette not scrolling down to the last element

Co-authored-by: Vitor Ramos <ramos.vitor89@gmail.com>
2024-06-23 09:55:04 +02:00
Zed Bot
11b45702c9 Bump to 0.141.1 for @osiewicz 2024-06-21 02:05:45 -07:00
Piotr Osiewicz
c844ba3cdc YAML: set auto_indent_using_last_non_empty_line to false (fix wonky formatting) (#13351)
This makes us treat yaml like other indentation-sensitive languages
(e.g. Python) and not reformat it on pasting and what not.

Fixes #12236
Fixes #13338

Release Notes:

- Fixed spurious appliance of auto-formatting to YAML blocks.
2024-06-21 11:04:14 +02:00
Joseph T Lyons
3562cad225 v0.141.x preview 2024-06-19 12:09:07 -04:00
9 changed files with 14 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -13318,7 +13318,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.141.0"
version = "0.141.2"
dependencies = [
"activity_indicator",
"anyhow",

View File

@@ -611,6 +611,7 @@ impl Telemetry {
let request_body = EventRequestBody {
installation_id: state.installation_id.as_deref().map(Into::into),
metrics_id: state.metrics_id.as_deref().map(Into::into),
session_id: state.session_id.clone(),
is_staff: state.is_staff,
app_version: state.app_version.clone(),

View File

@@ -664,6 +664,7 @@ where
#[derive(Serialize, Debug, clickhouse::Row)]
pub struct EditorEventRow {
installation_id: String,
metrics_id: String,
operation: String,
app_version: String,
file_extension: String,
@@ -713,6 +714,7 @@ impl EditorEventRow {
os_version: body.os_version.clone().unwrap_or_default(),
architecture: body.architecture.clone(),
installation_id: body.installation_id.clone().unwrap_or_default(),
metrics_id: body.metrics_id.clone().unwrap_or_default(),
session_id: body.session_id.clone(),
is_staff: body.is_staff,
time: time.timestamp_millis(),

View File

@@ -9160,6 +9160,12 @@ impl Editor {
Editor::for_multibuffer(excerpt_buffer, Some(workspace.project().clone()), true, cx)
});
editor.update(cx, |editor, cx| {
if let Some(first_range) = ranges_to_highlight.first() {
editor.change_selections(None, cx, |selections| {
selections.clear_disjoint();
selections.select_anchor_ranges(std::iter::once(first_range.clone()));
});
}
editor.highlight_background::<Self>(
&ranges_to_highlight,
|theme| theme.editor_highlighted_line_background,

View File

@@ -9,6 +9,7 @@ brackets = [
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
]
auto_indent_using_last_non_empty_line = false
increase_indent_pattern = ":\\s*[|>]?\\s*$"
prettier_parser_name = "yaml"
tab_size = 2

View File

@@ -300,7 +300,6 @@ impl<D: PickerDelegate> Picker<D> {
fn select_last(&mut self, _: &menu::SelectLast, cx: &mut ViewContext<Self>) {
let count = self.delegate.match_count();
if count > 0 {
self.delegate.set_selected_index(count - 1, cx);
self.set_selected_index(count - 1, true, cx);
cx.notify();
}

View File

@@ -5,6 +5,7 @@ use std::{fmt::Display, sync::Arc, time::Duration};
#[derive(Serialize, Deserialize, Debug)]
pub struct EventRequestBody {
pub installation_id: Option<String>,
pub metrics_id: Option<String>,
pub session_id: Option<String>,
pub is_staff: Option<bool>,
pub app_version: String,

View File

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

View File

@@ -1 +1 @@
dev
stable