From c76529b3cbd402218e9e0cf2db99b10718395298 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 8 Feb 2026 15:02:28 -0500 Subject: [PATCH] Fix first line background. Added a comment if the background in desired in the future. --- src/gui/filesystem.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/filesystem.rs b/src/gui/filesystem.rs index ac37908..e98bb15 100644 --- a/src/gui/filesystem.rs +++ b/src/gui/filesystem.rs @@ -10,9 +10,7 @@ use std::fs; use std::path::Path; use syntect::easy::HighlightLines; use syntect::highlighting::ThemeSet; -use syntect::html::{ - IncludeBackground, append_highlighted_html_for_styled_line, start_highlighted_html_snippet, -}; +use syntect::html::{IncludeBackground, append_highlighted_html_for_styled_line}; use syntect::parsing::SyntaxSet; use syntect::util::LinesWithEndings; @@ -99,7 +97,8 @@ impl qobject::FileSystem { ) .unwrap_or_else(|| ss.find_syntax_plain_text()); let mut highlighter = HighlightLines::new(lang, theme); - let (mut output, _bg) = start_highlighted_html_snippet(theme); + // If you care about the background, see `start_highlighted_html_snippet(theme);`. + let mut output = String::from("
\n");
             for line in LinesWithEndings::from(lines.as_str()) {
                 let regions = highlighter
                     .highlight_line(line, &ss)