From 9e69f251a865fae6e77cf6bc7d17d4edd0be3096 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Tue, 22 Aug 2023 13:19:06 +0200 Subject: [PATCH] do not show spacing selection in non-highlight --- src/components/commitlist.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/commitlist.rs b/src/components/commitlist.rs index b73ceb46..96f05f38 100644 --- a/src/components/commitlist.rs +++ b/src/components/commitlist.rs @@ -22,6 +22,7 @@ use itertools::Itertools; use ratatui::{ backend::Backend, layout::{Alignment, Rect}, + style::Style, text::{Line, Span}, widgets::{Block, Borders, Paragraph}, Frame, @@ -361,13 +362,19 @@ impl CommitList { ELEMENTS_PER_LINE + if marked.is_some() { 2 } else { 0 }, ); - let splitter_txt = Cow::from(symbol::EMPTY_SPACE); - let splitter = - Span::styled(splitter_txt, theme.text(true, selected)); - let normal = !self.items.highlighting() || (self.items.highlighting() && e.highlighted); + let splitter_txt = Cow::from(symbol::EMPTY_SPACE); + let splitter = Span::styled( + splitter_txt, + if normal { + theme.text(true, selected) + } else { + Style::default() + }, + ); + // marker if let Some(marked) = marked { txt.push(Span::styled(