diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-02-08 17:35:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-08 17:35:55 +0100 |
| commit | 326c8cd3c6566e8fa4acd3a9369c718ce96f6625 (patch) | |
| tree | 805ded9e78a35e9cd1ae91594358c8888a53abe2 /default-plugins/fixture-plugin-for-tests/src | |
| parent | docs(changelog): cwd fixes (diff) | |
| download | sl0ppij-326c8cd3c6566e8fa4acd3a9369c718ce96f6625.tar.gz sl0ppij-326c8cd3c6566e8fa4acd3a9369c718ce96f6625.tar.xz sl0ppij-326c8cd3c6566e8fa4acd3a9369c718ce96f6625.zip | |
feat(panes): allow specifying coordinates for a new floating pane through the CLI or plugins (#3122)
* working
* add tests
* add coordinates to all the places
* refactor: move things around:
* style(fmt): rustfmt
* style(code): cleanups
Diffstat (limited to 'default-plugins/fixture-plugin-for-tests/src')
| -rw-r--r-- | default-plugins/fixture-plugin-for-tests/src/main.rs | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/default-plugins/fixture-plugin-for-tests/src/main.rs b/default-plugins/fixture-plugin-for-tests/src/main.rs index 17f29943..fe740f74 100644 --- a/default-plugins/fixture-plugin-for-tests/src/main.rs +++ b/default-plugins/fixture-plugin-for-tests/src/main.rs @@ -167,10 +167,13 @@ impl ZellijPlugin for State { }); }, Key::Ctrl('h') => { - open_file_floating(FileToOpen { - path: std::path::PathBuf::from("/path/to/my/file.rs"), - ..Default::default() - }); + open_file_floating( + FileToOpen { + path: std::path::PathBuf::from("/path/to/my/file.rs"), + ..Default::default() + }, + None, + ); }, Key::Ctrl('i') => { open_file(FileToOpen { @@ -180,11 +183,14 @@ impl ZellijPlugin for State { }); }, Key::Ctrl('j') => { - open_file_floating(FileToOpen { - path: std::path::PathBuf::from("/path/to/my/file.rs"), - line_number: Some(42), - ..Default::default() - }); + open_file_floating( + FileToOpen { + path: std::path::PathBuf::from("/path/to/my/file.rs"), + line_number: Some(42), + ..Default::default() + }, + None, + ); }, Key::Ctrl('k') => { open_terminal(std::path::PathBuf::from("/path/to/my/file.rs").as_path()); @@ -192,6 +198,7 @@ impl ZellijPlugin for State { Key::Ctrl('l') => { open_terminal_floating( std::path::PathBuf::from("/path/to/my/file.rs").as_path(), + None, ); }, Key::Ctrl('m') => { @@ -202,11 +209,14 @@ impl ZellijPlugin for State { }); }, Key::Ctrl('n') => { - open_command_pane_floating(CommandToRun { - path: std::path::PathBuf::from("/path/to/my/file.rs"), - args: vec!["arg1".to_owned(), "arg2".to_owned()], - ..Default::default() - }); + open_command_pane_floating( + CommandToRun { + path: std::path::PathBuf::from("/path/to/my/file.rs"), + args: vec!["arg1".to_owned(), "arg2".to_owned()], + ..Default::default() + }, + None, + ); }, Key::Ctrl('o') => { switch_tab_to(1); |
