diff options
author | Ben S <ogham@bsago.me> | 2015-01-24 12:38:05 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-01-24 12:38:05 +0000 |
commit | 2ba0b3bd5f71d3ab96b0f1d9c8647c4ae9178921 (patch) | |
tree | ae91ce760e1fffa9fa9c988fe06ca07db691aedf /src/term.rs | |
parent | 6457f4b5772f659c5945a044168d0a2659fe2437 (diff) |
Convert docs to standard format
Diffstat (limited to 'src/term.rs')
-rw-r--r-- | src/term.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/term.rs b/src/term.rs index c0849be..dc98cbe 100644 --- a/src/term.rs +++ b/src/term.rs @@ -37,12 +37,11 @@ mod c { } } +/// Query the current processes's output, returning its width and height as a +/// number of characters. Returns None if the output isn't to a terminal. pub fn dimensions() -> Option<(usize, usize)> { let w = unsafe { c::dimensions() }; - // If either of the dimensions is 0 then the command failed, - // usually because output isn't to a terminal (instead to a file - // or pipe or something) if w.ws_col == 0 || w.ws_row == 0 { None } |