diff options
author | DLFW <daniel@llin.info> | 2022-08-14 02:04:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-13 20:04:38 -0400 |
commit | 6356efaa55830c4ef8ed976a6e89f738ab6e026d (patch) | |
tree | 9f6dde209a7c1e085764538edc2d1679bb50ca80 /src/preview | |
parent | d2ef6d44cc09ad3e57642d5839d972d426bfff12 (diff) |
Sort options individual per tab (#191)
Sort options (sort criterion, reversion, dir-first, and case-sensitivity)
are specific for each tab. Changing sort-options will not have any
affect on tabs other than the currently active one. Each new tab will
start with the default sort-options.
Diffstat (limited to 'src/preview')
-rw-r--r-- | src/preview/preview_dir.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/preview/preview_dir.rs b/src/preview/preview_dir.rs index b74e606..cf592a9 100644 --- a/src/preview/preview_dir.rs +++ b/src/preview/preview_dir.rs @@ -11,9 +11,14 @@ impl Background { pub fn load_preview(context: &mut AppContext, p: path::PathBuf) -> thread::JoinHandle<()> { let event_tx = context.events.event_tx.clone(); let options = context.config_ref().display_options_ref().clone(); + let tab_options = context + .tab_context_ref() + .curr_tab_ref() + .option_ref() + .clone(); thread::spawn(move || { - if let Ok(dirlist) = JoshutoDirList::from_path(p, &options) { + if let Ok(dirlist) = JoshutoDirList::from_path(p, &options, &tab_options) { let _ = event_tx.send(AppEvent::PreviewDir(Ok(Box::new(dirlist)))); } }) |