From 05c6cb1d0b576547c14b204e0df543650c93892f Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Sat, 20 Nov 2021 09:17:38 -0500 Subject: Solarized theme: fix popup colors, adjust menu (#1124) * fix popup colors, adjust menu * fix hardcoded horizontal rule color--- helix-term/src/ui/markdown.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'helix-term/src/ui/markdown.rs') diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs index 61630d55..649703b5 100644 --- a/helix-term/src/ui/markdown.rs +++ b/helix-term/src/ui/markdown.rs @@ -55,7 +55,7 @@ fn parse<'a>( fn to_span(text: pulldown_cmark::CowStr) -> Span { use std::ops::Deref; Span::raw::>(match text { - CowStr::Borrowed(s) => s.to_string().into(), // could retain borrow + CowStr::Borrowed(s) => s.into(), CowStr::Boxed(s) => s.to_string().into(), CowStr::Inlined(s) => s.deref().to_owned().into(), }) @@ -179,7 +179,9 @@ fn parse<'a>( spans.push(Span::raw(" ")); } Event::Rule => { - lines.push(Spans::from("---")); + let mut span = Span::raw("---"); + span.style = code_style; + lines.push(Spans::from(span)); lines.push(Spans::default()); } // TaskListMarker(bool) true if checked -- cgit v1.2.3-70-g09d2 From c71c9f69e21a80c5c9c744bddbde7d5041da99a5 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 7 Oct 2021 10:26:28 +0900 Subject: TODO --- helix-term/src/ui/markdown.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'helix-term/src/ui/markdown.rs') diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs index 649703b5..ca8303dd 100644 --- a/helix-term/src/ui/markdown.rs +++ b/helix-term/src/ui/markdown.rs @@ -228,6 +228,7 @@ impl Component for Markdown { return None; } let contents = parse(&self.contents, None, &self.config_loader); + // TODO: account for tab width let max_text_width = (viewport.0 - padding).min(120); let mut text_width = 0; let mut height = padding; -- cgit v1.2.3-70-g09d2