We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
out.as_raw_fd()
unix_term
1 parent 0567bdc commit 8e1b33dCopy full SHA for 8e1b33d
CHANGELOG.md
@@ -1,5 +1,11 @@
1
# Changelog
2
3
+## Unreleased
4
+
5
+### Bugfixes
6
7
+* Properly use configured output of `Term` to get terminal size (#186)
8
9
## 0.15.7
10
11
### Enhancements
src/unix_term.rs
@@ -46,7 +46,7 @@ pub fn c_result<F: FnOnce() -> libc::c_int>(f: F) -> io::Result<()> {
46
47
pub fn terminal_size(out: &Term) -> Option<(u16, u16)> {
48
unsafe {
49
- if libc::isatty(libc::STDOUT_FILENO) != 1 {
+ if libc::isatty(out.as_raw_fd()) != 1 {
50
return None;
51
}
52
0 commit comments