Skip to content

Commit

Permalink
fix: Escape control characters in command preview (#1588)
Browse files Browse the repository at this point in the history
This was missed in the initial change to escape control characters.
  • Loading branch information
tpoliaw committed Jan 19, 2024
1 parent cda135d commit 62f81a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atuin/src/command/client/search/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
time::Duration,
};

use atuin_common::utils;
use atuin_common::utils::{self, Escapable as _};
use crossterm::{
cursor::SetCursorStyle,
event::{
Expand Down Expand Up @@ -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")
};
Expand Down

0 comments on commit 62f81a8

Please sign in to comment.