mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-29 04:15:06 +03:00
feat(plugins): allow plugins to specify own_url in pipe destination (#3232)
This commit is contained in:
parent
2908d2fcef
commit
9885664fa4
@ -320,7 +320,13 @@ fn cli_pipe_output(env: &ForeignFunctionEnv, pipe_name: String, output: String)
|
||||
.context("failed to send pipe output")
|
||||
}
|
||||
|
||||
fn message_to_plugin(env: &ForeignFunctionEnv, message_to_plugin: MessageToPlugin) -> Result<()> {
|
||||
fn message_to_plugin(
|
||||
env: &ForeignFunctionEnv,
|
||||
mut message_to_plugin: MessageToPlugin,
|
||||
) -> Result<()> {
|
||||
if message_to_plugin.plugin_url.as_ref().map(|s| s.as_str()) == Some("zellij:OWN_URL") {
|
||||
message_to_plugin.plugin_url = Some(env.plugin_env.plugin.location.display());
|
||||
}
|
||||
env.plugin_env
|
||||
.senders
|
||||
.send_to_plugin(PluginInstruction::MessageFromPlugin {
|
||||
|
Loading…
Reference in New Issue
Block a user