diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index 64127e3af8b3..67349051ae60 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -419,14 +419,19 @@ impl Component for Menu { for i in 0..win_height { cell = &mut surface[(area.right() - 1, area.top() + i as u16)]; - let half_block = if render_borders { "▌" } else { "▐" }; + let (scroll_thumb, scroll_track) = if render_borders { + ("▌", "│") + } else { + ("▐", "▐") + }; if scroll_line <= i && i < scroll_line + scroll_height { // Draw scroll thumb - cell.set_symbol(half_block); + cell.set_symbol(scroll_thumb); cell.set_fg(scroll_style.fg.unwrap_or(helix_view::theme::Color::Reset)); - } else if !render_borders { + } else { // Draw scroll track + cell.set_symbol(scroll_track); cell.set_fg(scroll_style.bg.unwrap_or(helix_view::theme::Color::Reset)); } } diff --git a/helix-term/src/ui/popup.rs b/helix-term/src/ui/popup.rs index 7a6ffe9dd6d2..7e0bbf945d1a 100644 --- a/helix-term/src/ui/popup.rs +++ b/helix-term/src/ui/popup.rs @@ -295,14 +295,19 @@ impl Component for Popup { for i in 0..win_height { cell = &mut surface[(inner.right() - 1, inner.top() + (border + i) as u16)]; - let half_block = if render_borders { "▌" } else { "▐" }; + let (scroll_thumb, scroll_track) = if render_borders { + ("▌", "│") + } else { + ("▐", "▐") + }; if scroll_line <= i && i < scroll_line + scroll_height { // Draw scroll thumb - cell.set_symbol(half_block); + cell.set_symbol(scroll_thumb); cell.set_fg(scroll_style.fg.unwrap_or(helix_view::theme::Color::Reset)); - } else if !render_borders { + } else { // Draw scroll track + cell.set_symbol(scroll_track); cell.set_fg(scroll_style.bg.unwrap_or(helix_view::theme::Color::Reset)); } }