mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: tread esc as space in code previewer
This commit is contained in:
parent
9773ee1573
commit
5ea20229fb
1 changed files with 6 additions and 0 deletions
6
yazi-plugin/src/external/highlighter.rs
vendored
6
yazi-plugin/src/external/highlighter.rs
vendored
|
|
@ -84,6 +84,12 @@ impl Highlighter {
|
|||
buf.push(b'\n');
|
||||
}
|
||||
|
||||
buf.iter_mut().for_each(|b| {
|
||||
if *b == 27 {
|
||||
*b = b' '
|
||||
}
|
||||
});
|
||||
|
||||
if i > skip {
|
||||
after.push(String::from_utf8_lossy(&buf).into_owned());
|
||||
} else if !plain {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue