Skip to content

Commit

Permalink
Disable line wrap (#983)
Browse files Browse the repository at this point in the history
* disable line-wrap

* add panic hook

* revert change

* setup panic hook

* remove panic

* simplify logic

* remove generic constraint

* revert change on Cargo.lock

* revert change on main.rs

* merge the three writes into one
  • Loading branch information
o2sh authored Mar 17, 2023
1 parent 406a844 commit 71ea9c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ impl<W: Write> Printer<W> {
}
}

write!(self.writer, "{buf}")?;
// \x1B[?7l turns off line wrapping and \x1B[?7h turns it on
write!(self.writer, "\x1B[?7l{buf}\x1B[?7h")?;
}
}
Ok(())
Expand Down

0 comments on commit 71ea9c1

Please sign in to comment.