mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: replace escape characters with caret symbol in code previewer
This commit is contained in:
parent
5ea20229fb
commit
e9e1da115d
1 changed files with 1 additions and 5 deletions
6
yazi-plugin/src/external/highlighter.rs
vendored
6
yazi-plugin/src/external/highlighter.rs
vendored
|
|
@ -84,11 +84,7 @@ impl Highlighter {
|
|||
buf.push(b'\n');
|
||||
}
|
||||
|
||||
buf.iter_mut().for_each(|b| {
|
||||
if *b == 27 {
|
||||
*b = b' '
|
||||
}
|
||||
});
|
||||
buf.iter_mut().filter(|&&mut b| b == b'\x1b').for_each(|b| *b = b'^');
|
||||
|
||||
if i > skip {
|
||||
after.push(String::from_utf8_lossy(&buf).into_owned());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue