mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: inconsistent tab width in unassociated text files
This commit is contained in:
parent
7177317465
commit
10a11c0bea
1 changed files with 2 additions and 1 deletions
3
yazi-plugin/src/external/highlighter.rs
vendored
3
yazi-plugin/src/external/highlighter.rs
vendored
|
|
@ -97,7 +97,8 @@ impl Highlighter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if plain {
|
if plain {
|
||||||
Ok(Text::from(after.join("")))
|
let indent = " ".repeat(PREVIEW.tab_size as usize);
|
||||||
|
Ok(Text::from(after.join("").replace('\t', &indent)))
|
||||||
} else {
|
} else {
|
||||||
Self::highlight_with(before, after, syntax.unwrap()).await
|
Self::highlight_with(before, after, syntax.unwrap()).await
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue