Browse Source

Use terminal_size::terminal_size() instead of libc::isatty()

goth-turtle 4 years ago
parent
commit
3627633148
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main.rs

+ 1 - 1
src/main.rs

@@ -66,7 +66,7 @@ fn main() {
             let writer = io::stdout();
 
             let console_width = options.view.width.actual_terminal_width();
-            let theme = options.theme.to_theme(unsafe {libc::isatty(1)} != 0);
+            let theme = options.theme.to_theme(terminal_size::terminal_size().is_some());
             let exa = Exa { options, writer, input_paths, theme, console_width, git };
 
             match exa.run() {