diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-03-05 21:13:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 21:13:02 +0100 |
| commit | 903cdf5d32476a8d6cc208d2c418a1f2c67e5a53 (patch) | |
| tree | 9a4647d9dc3efcdea8149fd78fdfa956b3c8d8cb /default-plugins/strider | |
| parent | build: make test mirror build command for plugins (#4801) (diff) | |
| download | sl0ppij-903cdf5d32476a8d6cc208d2c418a1f2c67e5a53.tar.gz sl0ppij-903cdf5d32476a8d6cc208d2c418a1f2c67e5a53.tar.xz sl0ppij-903cdf5d32476a8d6cc208d2c418a1f2c67e5a53.zip | |
Click file paths to open in editor, allow plugins to change styles and hover of viewport (#4802)
* initial implementation
* implement hover
* add styles and foreground/background emphases, fix upsert hover collisions
* initial implementation of link plugin
* suppress highlighting + clicks on unfocused and mouse mode panes
* also make italic
* fix env var and ~ expansions
* fix regex issues and add defensive validations
* fix tests and add plugin assets
* add tests
* refactor all the things
* add pr
Diffstat (limited to 'default-plugins/strider')
| -rw-r--r-- | default-plugins/strider/src/main.rs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/default-plugins/strider/src/main.rs b/default-plugins/strider/src/main.rs index 8870232f..6357d955 100644 --- a/default-plugins/strider/src/main.rs +++ b/default-plugins/strider/src/main.rs @@ -138,11 +138,24 @@ impl ZellijPlugin for State { fn pipe(&mut self, pipe_message: PipeMessage) -> bool { if pipe_message.is_private && pipe_message.name == "filepicker" { - if let PipeSource::Cli(pipe_id) = &pipe_message.source { - #[cfg(target_family = "wasm")] - block_cli_pipe_input(pipe_id); + let open_directly = pipe_message + .args + .get("open_directly") + .map(|v| v == "true") + .unwrap_or(false); + if open_directly { + // Standalone mode: selecting a file opens it directly, + // then the plugin closes itself. + self.close_on_selection = true; + } else { + // Filepicker callback mode: send result back to caller. + if let PipeSource::Cli(pipe_id) = &pipe_message.source { + #[cfg(target_family = "wasm")] + block_cli_pipe_input(pipe_id); + } + self.handling_filepick_request_from = + Some((pipe_message.source, pipe_message.args)); } - self.handling_filepick_request_from = Some((pipe_message.source, pipe_message.args)); true } else { false |
