From c7603fe79dba02e8b26a732cd59d7186fab630cc Mon Sep 17 00:00:00 2001 From: TimonPost Date: Sat, 28 Jul 2018 10:17:25 +0200 Subject: [PATCH] removed git merge indicator --- examples/Crossterm 0.3.1/bin.rs | 15 +-------------- src/cursor/cursor.rs | 8 -------- src/lib.rs | 2 +- src/shared/Terminal.rs | 6 +----- src/state/commands/win_commands.rs | 2 +- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/examples/Crossterm 0.3.1/bin.rs b/examples/Crossterm 0.3.1/bin.rs index e59d3c7..6b6b553 100644 --- a/examples/Crossterm 0.3.1/bin.rs +++ b/examples/Crossterm 0.3.1/bin.rs @@ -25,21 +25,8 @@ use crossterm::Terminal; use std::{thread, time}; fn main() { -<<<<<<< HEAD let term = Terminal::new(); let mut cursor = term.cursor(); - cursor.goto(10,10); + cursor.goto(10, 10); cursor.print("test"); - - let stdin = term.input(); - let line = stdin.read_line(); - println!("{:?}", line) } -======= - { - let mut terminal = Terminal::new(); - terminal.enable_alternate_screen(); - thread::sleep(time::Duration::from_millis(5000)); - } -} ->>>>>>> 403d0668a72e9ca04a05bbe137a30d6a2d9ba90c diff --git a/src/cursor/cursor.rs b/src/cursor/cursor.rs index 01da783..755cc50 100644 --- a/src/cursor/cursor.rs +++ b/src/cursor/cursor.rs @@ -13,21 +13,13 @@ use std::rc::Rc; /// Struct that stores an specific platform implementation for cursor related actions. pub struct TerminalCursor<'cursor> { -<<<<<<< HEAD screen_manager: &'cursor ScreenManager, -======= - context: &'cursor ScreenManager, ->>>>>>> 403d0668a72e9ca04a05bbe137a30d6a2d9ba90c terminal_cursor: Box, } impl<'cursor> TerminalCursor<'cursor> { /// Create new cursor instance whereon cursor related actions can be performed. -<<<<<<< HEAD pub fn new(screen_manager: &'cursor ScreenManager) -> TerminalCursor<'cursor> { -======= - pub fn new(context: &'cursor ScreenManager) -> TerminalCursor<'cursor> { ->>>>>>> 403d0668a72e9ca04a05bbe137a30d6a2d9ba90c #[cfg(target_os = "windows")] let cursor = functions::get_module::>( WinApiCursor::new(), diff --git a/src/lib.rs b/src/lib.rs index a4167f8..455a604 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ pub mod cursor; pub mod input; pub mod manager; //pub mod style; -pub mod terminal; +//pub mod terminal; pub use shared::Terminal::Terminal; //pub use shared::crossterm::Crossterm; diff --git a/src/shared/Terminal.rs b/src/shared/Terminal.rs index 399890b..f8cf4e9 100644 --- a/src/shared/Terminal.rs +++ b/src/shared/Terminal.rs @@ -2,11 +2,10 @@ use {StateManager, ScreenManager}; use super::super::state::commands::*; use super::raw::RawTerminal; use super::screen::AlternateScreen; -<<<<<<< HEAD use super::super::cursor; use super::super::input; -use super::super::terminal; +//use super::super::terminal; use std::collections::HashMap; @@ -107,9 +106,6 @@ impl Terminal{ return input::TerminalInput::new(&self.active_screen) } - pub fn terminal(&self) -> input::TerminalInput { - return input::TerminalInput::new(&self.active_screen) - } } impl Drop for Terminal diff --git a/src/state/commands/win_commands.rs b/src/state/commands/win_commands.rs index 1d361e7..c990fb8 100644 --- a/src/state/commands/win_commands.rs +++ b/src/state/commands/win_commands.rs @@ -156,7 +156,7 @@ impl IAlternateScreenCommand for ToAlternateScreenBufferCommand { }; let b: &mut WinApiScreenManager = match screen_manager - .as_any() + .as_any_mut() .downcast_mut::() { Some(b) => b,