diff options
| author | Peter Holloway <holloway.p.r@gmail.com> | 2024-01-19 11:18:29 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-19 11:18:29 +0000 |
| commit | 62f81a8c9125ada94e6004d49428befaf6caec9e (patch) | |
| tree | dab7dcc9d82bdeabe7d8d4c30cdf1f17a9778b4d | |
| parent | fix: Print literal control characters to non terminals (#1586) (diff) | |
| download | atuin-62f81a8c9125ada94e6004d49428befaf6caec9e.zip | |
fix: Escape control characters in command preview (#1588)
This was missed in the initial change to escape control characters.
| -rw-r--r-- | atuin/src/command/client/search/interactive.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/atuin/src/command/client/search/interactive.rs b/atuin/src/command/client/search/interactive.rs index 209dc7f0..feee0572 100644 --- a/atuin/src/command/client/search/interactive.rs +++ b/atuin/src/command/client/search/interactive.rs @@ -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") }; |
