improve dir picker - don't auto cd
Dependencies
- [2]
YRGDFHABproject dir picker - [3]
TMDH7GPVdir picker scrollables handling + confirmation - [4]
LPSUBGUBadd projects picker
Change contents
- replacement in inflorescence_iced_widget/src/dir_picker.rs at line 156
let mut matches = if input.ends_with(PATH_SEP) {let ends_with_path_sep = input.ends_with(PATH_SEP);let mut matches = if ends_with_path_sep { - replacement in inflorescence_iced_widget/src/dir_picker.rs at line 161
if state.child_dirs.iter().any(|dir| {dir.file_name().map(|name| name.to_string_lossy())== Some(Cow::Borrowed(exact))}) {vec![input.to_string()]// We're looking for a case-insensitive match, but the// returned `matched` name has the actual file name caseif let Some(matched) =state.child_dirs.iter().find_map(|dir| {dir.file_name().and_then(|name| name.to_str()).and_then(|name| {(name.to_lowercase()== exact.to_lowercase()).then_some(name)})}){vec![matched.to_string()] - replacement in inflorescence_iced_widget/src/dir_picker.rs at line 181
// Change dir if there is only one matchif matches.len() == 1 {let matched =state.current_dir.join(matches.pop().unwrap());state.input = String::default();change_dir(state, matched)// Change dir only if there are some matchesif ends_with_path_sep {if !matches.is_empty() {let matched =state.current_dir.join(matches.pop().unwrap());state.input = String::default();change_dir(state, matched)} else {Task::none()}