diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2023-12-27 09:44:05 -0800 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2023-12-27 09:44:05 -0800 |
| commit | d754bf29a7f6c60bb3617518bc72c0f17a36fe50 (patch) | |
| tree | 8ea54ec0d58432ffcead23220069cc5ea888b9dc /src/tiocgwinsz.rs | |
| parent | Print the first n lines of the file. (diff) | |
| download | editor-d754bf29a7f6c60bb3617518bc72c0f17a36fe50.tar.zst | |
Use stdout to get terminal size.
Diffstat (limited to 'src/tiocgwinsz.rs')
| -rw-r--r-- | src/tiocgwinsz.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tiocgwinsz.rs b/src/tiocgwinsz.rs index 9fdf9a4..f8246fd 100644 --- a/src/tiocgwinsz.rs +++ b/src/tiocgwinsz.rs @@ -9,7 +9,7 @@ pub fn size() -> Option<winsize> { }; let result: c_int; unsafe { - result = libc::ioctl(0, libc::TIOCGWINSZ, &mut window); + result = libc::ioctl(1, libc::TIOCGWINSZ, &mut window); } if result < 0 { return None; |
