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/fixture-plugin-for-tests | |
| 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/fixture-plugin-for-tests')
| -rw-r--r-- | default-plugins/fixture-plugin-for-tests/src/main.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/default-plugins/fixture-plugin-for-tests/src/main.rs b/default-plugins/fixture-plugin-for-tests/src/main.rs index 6091586c..da0e6482 100644 --- a/default-plugins/fixture-plugin-for-tests/src/main.rs +++ b/default-plugins/fixture-plugin-for-tests/src/main.rs @@ -76,6 +76,7 @@ impl ZellijPlugin for State { EventType::FileSystemDelete, EventType::BeforeClose, EventType::PluginConfigurationChanged, + EventType::HighlightClicked, ]); watch_filesystem(); } @@ -590,6 +591,23 @@ impl ZellijPlugin for State { // Test send_sigkill_to_pane_id send_sigkill_to_pane_id(PaneId::Terminal(1)); }, + BareKey::Char('g') if key.has_only_modifiers(&[KeyModifier::Super]) => { + // Test set_pane_regex_highlights + let highlights = vec![RegexHighlight { + pattern: "test_pattern".to_string(), + style: HighlightStyle::Emphasis0, + context: BTreeMap::new(), + on_hover: false, + bold: false, + italic: true, + underline: true, + }]; + set_pane_regex_highlights(PaneId::Terminal(1), highlights); + }, + BareKey::Char('h') if key.has_only_modifiers(&[KeyModifier::Super]) => { + // Test clear_pane_highlights + clear_pane_highlights(PaneId::Terminal(1)); + }, BareKey::Char('a') if key.has_only_modifiers(&[KeyModifier::Ctrl, KeyModifier::Shift]) => { |
