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/strider/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/strider/src')
| -rw-r--r-- | default-plugins/strider/src/search/search_state.rs | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/default-plugins/strider/src/search/search_state.rs b/default-plugins/strider/src/search/search_state.rs index 834a74fe..60d03941 100644 --- a/default-plugins/strider/src/search/search_state.rs +++ b/default-plugins/strider/src/search/search_state.rs @@ -88,10 +88,13 @@ impl SearchState { match self.selected_search_result_entry() { Some(SearchResult::File { path, .. }) => { if self.should_open_floating { - open_file_floating(FileToOpen { - path: PathBuf::from(path), - ..Default::default() - }); + open_file_floating( + FileToOpen { + path: PathBuf::from(path), + ..Default::default() + }, + None, + ); } else { open_file(FileToOpen { path: PathBuf::from(path), @@ -103,11 +106,14 @@ impl SearchState { path, line_number, .. }) => { if self.should_open_floating { - open_file_floating(FileToOpen { - path: PathBuf::from(path), - line_number: Some(line_number), - ..Default::default() - }); + open_file_floating( + FileToOpen { + path: PathBuf::from(path), + line_number: Some(line_number), + ..Default::default() + }, + None, + ); } else { open_file(FileToOpen { path: PathBuf::from(path), @@ -132,7 +138,7 @@ impl SearchState { { let dir_path = dir_path_of_result(&path); if self.should_open_floating { - open_terminal_floating(&dir_path); + open_terminal_floating(&dir_path, None); } else { open_terminal(&dir_path); } |
