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 23, 2024
1 parent 12f7114 commit a7984ae
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 @@ -134,7 +134,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 @@ -168,7 +168,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 a7984ae

Please sign in to comment.