diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-27 21:11:19 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-27 21:14:27 -0400 |
commit | 4e00e82c62ded6e531f173914a68984307974323 (patch) | |
tree | 51c73862e8076736adf90f901240d11f7a2e62d5 /src/preview.rs | |
parent | 35579905606926893d4e7c0f3f58096c5b581444 (diff) |
move updating page state to cursor_move only
- refactor page state to take an end to prevent
blank views on init
- move functions out of JoshutoPanel into ui.rs
- create a struct for configuring how to display content
- new type JoshutoHistory
- rename display_options to display_menu
Diffstat (limited to 'src/preview.rs')
-rw-r--r-- | src/preview.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/preview.rs b/src/preview.rs index 44bcd41..b452616 100644 --- a/src/preview.rs +++ b/src/preview.rs @@ -45,11 +45,11 @@ fn preview_directory( ) { match history.entry(path.to_path_buf().clone()) { Entry::Occupied(mut entry) => { - win.display_contents(entry.get_mut(), config_t.scroll_offset); + ui::display_contents(win, entry.get_mut(), &ui::SECONDARY_DISPLAY_OPTION); } Entry::Vacant(entry) => { if let Ok(s) = JoshutoDirList::new(path.to_path_buf().clone(), &config_t.sort_option) { - win.display_contents(entry.insert(s), config_t.scroll_offset); + ui::display_contents(win, entry.insert(s), &ui::SECONDARY_DISPLAY_OPTION); } } } |