mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: don't search with an empty string
This commit is contained in:
parent
a027c1be12
commit
aeb43fe00c
1 changed files with 4 additions and 0 deletions
|
|
@ -63,6 +63,10 @@ impl Tab {
|
||||||
let mut input = Input::_show(InputCfg::search(&opt.type_.to_string()));
|
let mut input = Input::_show(InputCfg::search(&opt.type_.to_string()));
|
||||||
let Some(Ok(subject)) = input.recv().await else { bail!("") };
|
let Some(Ok(subject)) = input.recv().await else { bail!("") };
|
||||||
|
|
||||||
|
if subject.is_empty() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
cwd = cwd.into_search(subject.clone());
|
cwd = cwd.into_search(subject.clone());
|
||||||
let rx = if opt.type_ == OptType::Rg {
|
let rx = if opt.type_ == OptType::Rg {
|
||||||
external::rg(external::RgOpt { cwd: cwd.clone(), hidden, subject })
|
external::rg(external::RgOpt { cwd: cwd.clone(), hidden, subject })
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue