From c45177e2963c285a19db2cc2424df53041d48640 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Sat, 6 Sep 2025 02:05:42 +0530 Subject: [PATCH] editor: Fix fold placeholder hover width smaller than marker (#37663) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: Screenshot 2025-09-06 at 1 21 39 AM The fold marker we use, `⋯`, isn’t rendered at the same size as the editor’s font. Notice how the fold marker appears larger than the same character typed directly in the editor buffer. image When we shape the line, we use the editor’s font size, and it ends up determining the element’s width. To fix this, we should treat the ellipsis as a UI element rather than a buffer character, since current visual size looks good to me. Screenshot 2025-09-06 at 1 29 28 AM Release Notes: - Fixed an issue where the fold placeholder’s hover area was smaller than the marker. --- crates/editor/src/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index fd2299f37dfc91c4a1d287c549269a7a77fc07e7..2374c8d6875f05608aa800de660fb3602ed35988 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -1794,7 +1794,7 @@ impl Editor { let font_size = style.font_size.to_pixels(window.rem_size()); let editor = cx.entity().downgrade(); let fold_placeholder = FoldPlaceholder { - constrain_width: true, + constrain_width: false, render: Arc::new(move |fold_id, fold_range, cx| { let editor = editor.clone(); div()