From 932981fca14824cfbacafc900ca9bbe08c1b5a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=80=E1=B4=8D=E1=B4=9B=E1=B4=8F=E1=B4=80=E1=B4=87?= =?UTF-8?q?=CA=80?= Date: Wed, 4 Mar 2026 19:59:08 +0800 Subject: [PATCH] editor: Prevent underlines from appearing in minimap (#48510) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I noticed that the minimap seems to render underlines with the same thickness as the main editor, which looks a bit off. This becomes much more noticeable when enabling `semantic_token_rules` (due to the increased number of underlines): ```json "global_lsp_settings": { "semantic_token_rules": [ { "token_modifiers": ["mutable"], "underline": true, }, ], } ``` Looking at the existing code, I found that diagnostic underlines already check `editor_style.show_underlines` to ensure they are only displayed in the main editor. To maintain consistency, I applied the same filtering logic to `chunk_highlight` so that these underlines are no longer rendered in the minimap. Before: CleanShot 2026-02-06 at 02 28 31@2x After: CleanShot 2026-02-06 at 02 31 36@2x Release Notes: - N/A *or* Added/Fixed/Improved ... --- crates/editor/src/display_map.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rs index b666557b90a3c1181404d8f09b1d50ff9f8402a9..658239db9a575d4d13c2a6f7877e20fcd6e47673 100644 --- a/crates/editor/src/display_map.rs +++ b/crates/editor/src/display_map.rs @@ -1924,6 +1924,9 @@ impl DisplaySnapshot { color } }), + underline: chunk_highlight + .underline + .filter(|_| editor_style.show_underlines), ..chunk_highlight } });