Skip to content

Commit 71ea9c1

Browse files
authored
Disable line wrap (#983)
* 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
1 parent 406a844 commit 71ea9c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ui/printer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ impl<W: Write> Printer<W> {
135135
}
136136
}
137137

138-
write!(self.writer, "{buf}")?;
138+
// \x1B[?7l turns off line wrapping and \x1B[?7h turns it on
139+
write!(self.writer, "\x1B[?7l{buf}\x1B[?7h")?;
139140
}
140141
}
141142
Ok(())

0 commit comments

Comments
 (0)