diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-13 08:58:33 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-13 08:58:33 -0500 |
commit | f15674eb5c550423b8b7d02ac05bd36a9dec4040 (patch) | |
tree | bded485cf3eded5c73e2466debe80911efed6665 /src | |
parent | 89b08eb9905db22a3e9751f44440d22e114277a3 (diff) |
fix initial preview not working
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/load_child.rs | 1 | ||||
-rw-r--r-- | src/commands/open_file.rs | 1 | ||||
-rw-r--r-- | src/commands/parent_directory.rs | 1 | ||||
-rw-r--r-- | src/run.rs | 7 | ||||
-rw-r--r-- | src/tab.rs | 8 |
5 files changed, 5 insertions, 13 deletions
diff --git a/src/commands/load_child.rs b/src/commands/load_child.rs index d70314c..693e339 100644 --- a/src/commands/load_child.rs +++ b/src/commands/load_child.rs @@ -1,6 +1,5 @@ use std::path::PathBuf; -use crate::commands::{JoshutoCommand, JoshutoRunnable}; use crate::context::JoshutoContext; use crate::error::JoshutoResult; use crate::history::DirectoryHistory; diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs index a6439cd..5335fcd 100644 --- a/src/commands/open_file.rs +++ b/src/commands/open_file.rs @@ -7,7 +7,6 @@ use crate::error::{JoshutoError, JoshutoErrorKind, JoshutoResult}; use crate::history::DirectoryHistory; use crate::textfield::TextField; use crate::ui::TuiBackend; -use crate::window; use crate::MIMETYPE_T; diff --git a/src/commands/parent_directory.rs b/src/commands/parent_directory.rs index ee3c621..d7de010 100644 --- a/src/commands/parent_directory.rs +++ b/src/commands/parent_directory.rs @@ -1,7 +1,6 @@ use crate::commands::{JoshutoCommand, JoshutoRunnable}; use crate::context::JoshutoContext; use crate::error::JoshutoResult; -use crate::history::DirectoryHistory; use crate::ui::TuiBackend; #[derive(Clone, Debug)] @@ -2,7 +2,7 @@ use std::thread; use termion::event::Key; -use crate::commands::{CommandKeybind, JoshutoCommand, ReloadDirList}; +use crate::commands::{CommandKeybind, CursorMoveUp, JoshutoCommand, JoshutoRunnable}; use crate::config::{JoshutoCommandMapping, JoshutoConfig}; use crate::context::JoshutoContext; use crate::tab::JoshutoTab; @@ -75,6 +75,10 @@ pub fn run(config_t: JoshutoConfig, keymap_t: JoshutoCommandMapping) { return; } } + { + let tmp = CursorMoveUp::new(0); + tmp.execute(&mut context, &mut backend); + } backend.render(&context); let mut io_handle = None; @@ -154,5 +158,4 @@ pub fn run(config_t: JoshutoConfig, keymap_t: JoshutoCommandMapping) { } } } - ui::end_ncurses(); } @@ -2,15 +2,7 @@ use std::path::PathBuf; use crate::fs::JoshutoDirList; use crate::history::{DirectoryHistory, JoshutoHistory}; -use crate::preview; use crate::sort; -use crate::ui; -use crate::window::{JoshutoPanel, JoshutoView}; -use crate::JoshutoConfig; - -use crate::{HOME_DIR, HOSTNAME, USERNAME}; - -use crate::THEME_T; pub struct JoshutoTab { pub history: JoshutoHistory, |