mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
a9fd9d13c6
commit
a8ef6d6355
3 changed files with 7 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::{mem, time::Duration};
|
||||
use std::{borrow::Cow, mem, time::Duration};
|
||||
|
||||
use tokio::pin;
|
||||
use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream};
|
||||
|
|
@ -29,7 +29,7 @@ impl Tab {
|
|||
InputProxy::show(InputCfg::search(&opt.via.to_string()).with_value(opt.subject));
|
||||
|
||||
if let Some(Ok(subject)) = input.recv().await {
|
||||
opt.subject = subject.into();
|
||||
opt.subject = Cow::Owned(subject);
|
||||
TabProxy::search_do(opt);
|
||||
}
|
||||
});
|
||||
|
|
@ -52,14 +52,14 @@ impl Tab {
|
|||
external::rg(external::RgOpt {
|
||||
cwd: cwd.clone(),
|
||||
hidden,
|
||||
subject: opt.subject.into(),
|
||||
subject: opt.subject.into_owned(),
|
||||
args: opt.args,
|
||||
})
|
||||
} else {
|
||||
external::fd(external::FdOpt {
|
||||
cwd: cwd.clone(),
|
||||
hidden,
|
||||
subject: opt.subject.into(),
|
||||
subject: opt.subject.into_owned(),
|
||||
args: opt.args,
|
||||
})
|
||||
}?;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ Please replace e.g. `shell` with `shell --interactive`, `shell "my-template"` wi
|
|||
let mut result =
|
||||
InputProxy::show(InputCfg::shell(opt.block).with_value(opt.run).with_cursor(opt.cursor));
|
||||
match result.recv().await {
|
||||
Some(Ok(e)) => opt.run = e.into(),
|
||||
Some(Ok(e)) => opt.run = Cow::Owned(e),
|
||||
_ => return,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ impl App {
|
|||
}
|
||||
|
||||
if opt.mode == PluginMode::Async {
|
||||
return self.cx.tasks.plugin_micro(opt.id.as_ref().to_owned(), opt.args);
|
||||
return self.cx.tasks.plugin_micro(opt.id.into_owned(), opt.args);
|
||||
} else if opt.mode == PluginMode::Sync && hits {
|
||||
return self.plugin_do(opt);
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ impl App {
|
|||
};
|
||||
|
||||
if opt.mode.auto_then(chunk.sync_entry) != PluginMode::Sync {
|
||||
return self.cx.tasks.plugin_micro(opt.id.as_ref().to_owned(), opt.args);
|
||||
return self.cx.tasks.plugin_micro(opt.id.into_owned(), opt.args);
|
||||
}
|
||||
|
||||
match LUA.named_registry_value::<RtRef>("rt") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue