Skip to content

Commit

Permalink
Fix non consistent builds due to lack of precise versionning in cross…
Browse files Browse the repository at this point in the history
…term subcrate versionning

See crossterm-rs/crossterm#186
  • Loading branch information
Canop committed Jul 31, 2019
1 parent 8012d31 commit 25eb72f
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 42 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<a name="v0.9.2"></a>
### v0.9.2 - 2019-07-31
Fix non consistent builds due to lack of precise versionning in crossterm subcrate versionning

<a name="v0.9.1"></a>
### v0.9.1 - 2019-07-29
Expand Down
34 changes: 15 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "broot"
version = "0.9.1"
version = "0.9.2"
authors = ["dystroy <[email protected]>"]
repository = "https://github.com/Canop/broot"
description = "Fuzzy Search + tree + cd"
Expand All @@ -23,9 +23,14 @@ clap = "2.33"
glob = "0.3"
crossbeam = "0.7"
opener = "0.4"
crossterm = "0.9.6"
crossterm_cursor = "=0.2.4"
crossterm_input = "=0.3.6"
crossterm_screen = "=0.2.3"
crossterm_style = "=0.3.3"
crossterm_terminal = "=0.2.4"
crossterm_utils = "=0.2.3"
umask = "0.1.4"
termimad = "0.6.1"
termimad = "0.6.2"
#termimad = { path = "../termimad" }

[target.'cfg(unix)'.dependencies]
Expand Down
5 changes: 3 additions & 2 deletions src/browser_states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::time::Instant;
use std::fs::OpenOptions;

use opener;
use crossterm_terminal::{ClearType, Terminal};

use crate::app::{AppState, AppStateCmdResult};
use crate::app_context::AppContext;
Expand Down Expand Up @@ -436,8 +437,8 @@ impl AppState for BrowserState {
let tree = self.displayed_tree();
let total_char_size = 9;
screen.goto(screen.w - total_char_size, screen.h);
let terminal = crossterm::Terminal::new();
terminal.clear(crossterm::ClearType::UntilNewLine)?;
let terminal = Terminal::new();
terminal.clear(ClearType::UntilNewLine)?;
let h_value = if tree.options.show_hidden { 'y' } else { 'n' };
let gi_value = match tree.options.respect_git_ignore {
OptionBool::Auto => 'a',
Expand Down
8 changes: 4 additions & 4 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::io;
use std::path::PathBuf;
use std::result::Result;

use crossterm::Color::{self, *};
use crossterm_style::Color;
use termimad::{Alignment, MadSkin};

use crate::errors::{ProgramError, TreeBuildError};
Expand Down Expand Up @@ -167,7 +167,7 @@ pub fn read_launch_args() -> Result<AppLaunchArgs, ProgramError> {
/// wait for user input, return `true` if she
/// didn't answer 'n'
pub fn ask_authorization() -> io::Result<bool> {
let answer = crossterm::input().read_line()?;
let answer = crossterm_input::input().read_line()?;
Ok(match answer.as_ref() {
"n" | "N" => false,
_ => true,
Expand All @@ -177,8 +177,8 @@ pub fn ask_authorization() -> io::Result<bool> {
pub fn mad_skin() -> MadSkin {
let mut skin = MadSkin::default();
skin.set_headers_fg(Color::AnsiValue(178));
skin.bold.set_fg(Yellow);
skin.italic.set_fg(Magenta);
skin.bold.set_fg(Color::Yellow);
skin.italic.set_fg(Color::Magenta);
skin.code_block.align = Alignment::Center;
skin
}
2 changes: 1 addition & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! in the input. It's independant of the state of the application
//! (verbs arent checked at this point)
use crossterm::KeyEvent;
use crossterm_input::KeyEvent;
use regex::Regex;
use crate::verb_invocation::VerbInvocation;
use termimad::{
Expand Down
3 changes: 1 addition & 2 deletions src/conf.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! manage reading the verb shortcuts from the configuration file,
//! initializing if if it doesn't yet exist
use crossterm::Attribute;
use crossterm::ObjectStyle;
use crossterm_style::{Attribute, ObjectStyle};
use directories::ProjectDirs;
use std::collections::HashMap;
use std::fs;
Expand Down
5 changes: 3 additions & 2 deletions src/displayable_tree.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::fmt;
use std::time::SystemTime;
use crossterm::{ClearType, Terminal};
use crossterm_terminal::{ClearType, Terminal};
use chrono::offset::Local;
use chrono::DateTime;

Expand All @@ -15,7 +15,8 @@ use crate::flat_tree::{LineType, Tree, TreeLine};
use crate::patterns::Pattern;
use crate::skin::{Skin, SkinEntry};

use crossterm::{Color, Colored, TerminalCursor};
use crossterm_style::{Color, Colored};
use crossterm_cursor::TerminalCursor;

/// A tree wrapper implementing Display
/// which can be used either
Expand Down
2 changes: 1 addition & 1 deletion src/help_states.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::io;

use crossterm::{Terminal, ClearType};
use crossterm_terminal::{Terminal, ClearType};
use termimad::{Area, MadView};

use crate::app::{AppState, AppStateCmdResult};
Expand Down
2 changes: 1 addition & 1 deletion src/patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use core::result;
use std::{fmt, mem};

use crossterm::ObjectStyle;
use crossterm_style::ObjectStyle;

use crate::commands::Command;
use crate::errors::RegexError;
Expand Down
10 changes: 6 additions & 4 deletions src/screens.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::io;

use crossterm::{self, AlternateScreen, ClearType, TerminalCursor};
use crossterm_cursor::TerminalCursor;
use crossterm_screen::AlternateScreen;
use crossterm_terminal::{ClearType};
use termimad::{
Area,
CompoundStyle,
Expand All @@ -15,7 +17,7 @@ use crate::skin::Skin;
pub struct Screen {
pub w: u16,
pub h: u16,
pub alternate_screen: crossterm::AlternateScreen,
pub alternate_screen: crossterm_screen::AlternateScreen,
pub skin: Skin,
pub input_field: InputField,
}
Expand All @@ -39,7 +41,7 @@ impl Screen {
Ok(screen)
}
pub fn read_size(&mut self, con: &AppContext) -> io::Result<()> {
let terminal = crossterm::Terminal::new();
let terminal = crossterm_terminal::Terminal::new();
let (w, h) = terminal.terminal_size();
self.w = w;
self.h = h + 1;
Expand All @@ -61,7 +63,7 @@ impl Screen {
cursor.goto(x - 1, y - 1).unwrap();
}
pub fn clear_line(&self) {
let terminal = crossterm::Terminal::new();
let terminal = crossterm_terminal::Terminal::new();
terminal.clear(ClearType::UntilNewLine).unwrap(); // FIXME try to manage those errors
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/skin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use std::collections::HashMap;
use std::fmt;

use crossterm::{
use crossterm_style::{
Attribute::{self, *},
Color::AnsiValue,
Color::{self, *},
Expand Down
2 changes: 1 addition & 1 deletion src/skin_conf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crossterm::{
use crossterm_style::{
Attribute::{self, *},
Color::{self, *},
ObjectStyle,
Expand Down
2 changes: 1 addition & 1 deletion src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::io;

use crate::screens::Screen;
use crate::skin::{self, SkinEntry};
use crossterm::ObjectStyle;
use crossterm_style::ObjectStyle;

/// the status module manages writing information on the grey line
/// near the bottom of the screen
Expand Down

0 comments on commit 25eb72f

Please sign in to comment.