word wrap in preview

This commit is contained in:
Lex Moskovski 2024-06-08 15:12:22 -07:00 committed by sxyazi
parent 58ba459b63
commit 935c83983d
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View file

@ -18,6 +18,7 @@ title_format = "Yazi: {cwd}"
[preview]
tab_size = 2
word_wrap = false
max_width = 600
max_height = 900
cache_dir = ""

View file

@ -10,6 +10,7 @@ use crate::Xdg;
#[derive(Debug, Serialize)]
pub struct Preview {
pub tab_size: u8,
pub word_wrap: bool,
pub max_width: u32,
pub max_height: u32,
@ -59,6 +60,7 @@ impl FromStr for Preview {
#[derive(Deserialize, Validate)]
struct Shadow {
tab_size: u8,
word_wrap: bool,
max_width: u32,
max_height: u32,
@ -85,6 +87,7 @@ impl FromStr for Preview {
Ok(Preview {
tab_size: preview.tab_size,
word_wrap: preview.word_wrap,
max_width: preview.max_width,
max_height: preview.max_height,