Compare commits

...

6 Commits

Author SHA1 Message Date
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
6 changed files with 10 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

@@ -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

@@ -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
preview