Skip to content

Commit d701547

Browse files
authored
Merge pull request #237 from ogham/exa/term_size
Use term_size crate to fetch terminal size.
2 parents 878be36 + f249c85 commit d701547

File tree

5 files changed

+37
-67
lines changed

5 files changed

+37
-67
lines changed

Cargo.lock

+34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ scoped_threadpool = "0.1.*"
3636
term_grid = "0.1.2"
3737
unicode-width = "0.1.4"
3838
users = "0.5.2"
39+
term_size = "0.3.0"
3940

4041
[features]
4142
default = [ "git" ]

src/exa.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ extern crate term_grid;
1515
extern crate unicode_width;
1616
extern crate users;
1717
extern crate zoneinfo_compiled;
18+
extern crate term_size;
1819

1920
#[cfg(feature="git")] extern crate git2;
2021

@@ -37,7 +38,6 @@ mod fs;
3738
mod info;
3839
mod options;
3940
mod output;
40-
mod term;
4141

4242

4343
/// The main program wrapper.

src/options/view.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use output::time::TimeFormat;
1111
use options::Misfire;
1212
use fs::feature::xattr;
1313

14-
1514
/// The **view** contains all information about how to format output.
1615
#[derive(Debug)]
1716
pub struct View {
@@ -393,7 +392,7 @@ impl Classify {
393392
// so it’s easier to just cache it the first time it runs.
394393
lazy_static! {
395394
static ref TERM_WIDTH: Option<usize> = {
396-
use term::dimensions;
395+
use term_size::dimensions;
397396
dimensions().map(|t| t.0)
398397
};
399398
}

src/term.rs

-64
This file was deleted.

0 commit comments

Comments
 (0)