diff --git a/src/run.rs b/src/run.rs index 7ff0881..ef2f959 100644 --- a/src/run.rs +++ b/src/run.rs @@ -8,7 +8,7 @@ use super::session::*; use super::state::*; use super::term::*; -use crossterm::cursor::RestorePosition; +use crossterm::cursor::{RestorePosition, SavePosition}; use crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers}; use crossterm::execute; use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen}; @@ -155,6 +155,7 @@ pub fn run(arg: PathBuf, log: bool) -> Result<(), FxError> { fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> { //Enter the alternate screen with crossterm let mut screen = stdout(); + write!(screen, "{}", SavePosition)?; enter_raw_mode(); execute!(screen, EnterAlternateScreen)?;