Skip to content

Commit

Permalink
expand tabs during command processing
Browse files Browse the repository at this point in the history
  • Loading branch information
cartercanedy committed Sep 28, 2024
1 parent ef7cd69 commit 1fc840f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tui/src/floating_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fn get_lines_owned(s: &str) -> Vec<String> {

impl FloatingText {
pub fn new(text: String, mode: FloatingTextMode) -> Self {
let src = get_lines(&text)
let src = get_lines(&text.replace("\t", " "))
.into_iter()
.map(|s| s.to_string())
.collect::<Vec<_>>();
Expand Down Expand Up @@ -165,7 +165,7 @@ impl FloatingText {
Command::None => (0usize, None),
};

let src = get_lines_owned(&get_highlighted_string(&src?)?);
let src = get_lines_owned(&get_highlighted_string(&src?.replace("\t", " "))?);

Some(Self {
src,
Expand Down

0 comments on commit 1fc840f

Please sign in to comment.