fix(1220): Workspace Filtermode not handled in skim engine (#1273)
* fix(1220): Workspace Filtermode not handled in skim engine * fix: review suggestion accepted
This commit is contained in:
parent
f25681d8b1
commit
1735be05d7
1 changed files with 6 additions and 0 deletions
|
@ -54,6 +54,11 @@ async fn fuzzy_search(
|
||||||
yield_now().await;
|
yield_now().await;
|
||||||
}
|
}
|
||||||
let context = &state.context;
|
let context = &state.context;
|
||||||
|
let git_root = context
|
||||||
|
.git_root
|
||||||
|
.as_ref()
|
||||||
|
.and_then(|git_root| git_root.to_str())
|
||||||
|
.unwrap_or(&context.cwd);
|
||||||
match state.filter_mode {
|
match state.filter_mode {
|
||||||
FilterMode::Global => {}
|
FilterMode::Global => {}
|
||||||
// we aggregate host by ',' separating them
|
// we aggregate host by ',' separating them
|
||||||
|
@ -72,6 +77,7 @@ async fn fuzzy_search(
|
||||||
.contains(&context.session.as_bytes()) => {}
|
.contains(&context.session.as_bytes()) => {}
|
||||||
// we aggregate directory by ':' separating them
|
// we aggregate directory by ':' separating them
|
||||||
FilterMode::Directory if history.cwd.split(':').contains(&context.cwd.as_str()) => {}
|
FilterMode::Directory if history.cwd.split(':').contains(&context.cwd.as_str()) => {}
|
||||||
|
FilterMode::Workspace if history.cwd.split(':').contains(&git_root) => {}
|
||||||
_ => continue,
|
_ => continue,
|
||||||
}
|
}
|
||||||
#[allow(clippy::cast_lossless, clippy::cast_precision_loss)]
|
#[allow(clippy::cast_lossless, clippy::cast_precision_loss)]
|
||||||
|
|
Loading…
Reference in a new issue