mirror of
https://github.com/atuinsh/atuin.git
synced 2025-02-25 06:43:59 +01:00
fix: Escape control characters in command preview (#1588)
This was missed in the initial change to escape control characters.
This commit is contained in:
parent
cda135d241
commit
62f81a8c91
@ -3,7 +3,7 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use atuin_common::utils;
|
||||
use atuin_common::utils::{self, Escapable as _};
|
||||
use crossterm::{
|
||||
cursor::SetCursorStyle,
|
||||
event::{
|
||||
@ -678,7 +678,7 @@ impl State {
|
||||
.map(|(i, _)| i)
|
||||
.chain(Some(line.len()))
|
||||
.tuple_windows()
|
||||
.map(|(a, b)| &line[a..b])
|
||||
.map(|(a, b)| (&line[a..b]).escape_control().to_string())
|
||||
})
|
||||
.join("\n")
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user