From b51c2e5fb6a7af8a59a971ae1b568722ea0cf2b9 Mon Sep 17 00:00:00 2001 From: Carlos de Paula Date: Wed, 12 Nov 2025 11:55:32 -0300 Subject: [PATCH] Fix: Adapt code to use the merged PR's bg_color() method instead of direct background field access --- yazi-binding/src/elements/mod.rs | 2 +- yazi-fm/src/root.rs | 5 +++-- yazi-fm/src/term.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/yazi-binding/src/elements/mod.rs b/yazi-binding/src/elements/mod.rs index 6cdcbd9c..8d295c52 100644 --- a/yazi-binding/src/elements/mod.rs +++ b/yazi-binding/src/elements/mod.rs @@ -1 +1 @@ -yazi_macro::mod_flat!(align area bar border cell clear constraint edge elements gauge layout line list pad pos rect renderable row span table text wrap); +yazi_macro::mod_flat!(align area bar block border cell clear constraint edge elements gauge layout line list pad pos rect renderable row span table text wrap); diff --git a/yazi-fm/src/root.rs b/yazi-fm/src/root.rs index a765e963..e7a8a867 100644 --- a/yazi-fm/src/root.rs +++ b/yazi-fm/src/root.rs @@ -152,8 +152,9 @@ impl Widget for Root<'_> { // Fill background on all cells to create an opaque background (like fzf does). // This is done AFTER all rendering so text/foreground colors are already set. - if !THEME.app.background.is_empty() { - if let Ok(bg_color) = THEME.app.background.parse::() { + let bg_color_str = THEME.app.bg_color(); + if !bg_color_str.is_empty() { + if let Ok(bg_color) = bg_color_str.parse::() { // When using app-wide background, fill everything including borders for y in area.top()..area.bottom() { for x in area.left()..area.right() { diff --git a/yazi-fm/src/term.rs b/yazi-fm/src/term.rs index ff39de7d..5a036eff 100644 --- a/yazi-fm/src/term.rs +++ b/yazi-fm/src/term.rs @@ -23,7 +23,7 @@ impl Term { last_area: Default::default(), last_buffer: Default::default(), }; - let background = &THEME.app.background; + let background = THEME.app.bg_color(); enable_raw_mode()?; static FIRST: SyncCell = SyncCell::new(false);