Compare commits

...

3 Commits

Author SHA1 Message Date
Max Brunsfeld
427b73c114 zed 0.138.1 2024-05-29 11:39:54 -07:00
Bennet Bo Fenner
5a2297c2a3 Fix deleted hunk offset when zooming (#12442)
Release Notes:

- Fixed an issue where expanded hunks could be rendered at the wrong
position when zooming
- Fixed an issue where expanded hunks could be rendered at the wrong
position when toggling git blame
([#11941](https://github.com/zed-industries/zed/issues/11941))
2024-05-29 11:13:07 -07:00
Joseph T. Lyons
1c7ee8998c v0.138.x preview 2024-05-29 12:15:00 -04:00
4 changed files with 7 additions and 6 deletions

2
Cargo.lock generated
View File

@@ -13046,7 +13046,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.138.0"
version = "0.138.1"
dependencies = [
"activity_indicator",
"anyhow",

View File

@@ -309,17 +309,18 @@ impl Editor {
let deleted_hunk_color = deleted_hunk_color(cx);
let (editor_height, editor_with_deleted_text) =
editor_with_deleted_text(diff_base_buffer, deleted_hunk_color, hunk, cx);
let parent_gutter_offset = self.gutter_dimensions.width + self.gutter_dimensions.margin;
let editor_model = cx.model().clone();
let mut new_block_ids = self.insert_blocks(
Some(BlockProperties {
position: hunk.multi_buffer_range.start,
height: editor_height.max(deleted_text_height),
style: BlockStyle::Flex,
render: Box::new(move |_| {
render: Box::new(move |cx| {
let gutter_dimensions = editor_model.read(cx).gutter_dimensions;
div()
.bg(deleted_hunk_color)
.size_full()
.pl(parent_gutter_offset)
.pl(gutter_dimensions.width + gutter_dimensions.margin)
.child(editor_with_deleted_text.clone())
.into_any_element()
}),

View File

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

View File

@@ -1 +1 @@
dev
preview