diff options
| author | Cosmin Popescu <cosminadrianpopescu@gmail.com> | 2022-06-06 09:20:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-06 09:20:07 +0200 |
| commit | e1fcf3a6dbc7a65a341127fab2fca7b4fb2d081b (patch) | |
| tree | ec1061b57347348f081d64c532f7fc12ff21c4dd /zellij-utils/src/input/options.rs | |
| parent | flake.lock: Update (#1455) (diff) | |
| download | sl0ppij-e1fcf3a6dbc7a65a341127fab2fca7b4fb2d081b.tar.gz sl0ppij-e1fcf3a6dbc7a65a341127fab2fca7b4fb2d081b.tar.xz sl0ppij-e1fcf3a6dbc7a65a341127fab2fca7b4fb2d081b.zip | |
feat(scroll): edit scrollback with default editor (#1456)
* initial commit for opening the current buffer in an editor
* fix(editor): take hidden panes into consideration when manipulating tiled grid
* when closing an edit buffer, take the geometry of the replaced buffer from the closed buffer
* if the floating panels are displayed, don't add to hidden panels the current buffer
* strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels
* Revert "strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels"
This reverts commit c52a203a20cf4c87c147be8b9c193ed6458c1038.
* remove the floating panes by moving them to the tiled_panes in hidden_panels
* feat(edit): open editor to correct line and don't crash when none is set
* formatting
* feat(edit): use suppressed panes
* style(fmt): rustfmt and logs
* style(fmt): clean up unused code
* test(editor): integration test for suppressing/closing suppressed pane
* test(e2e): editor e2e test
* style(fmt): rustfmt
* feat(edit): update ui and setup
* style(fmt): rustfmt
* feat(config): allow configuring scrollback_editor explicitly
* style(fmt): rustfmt
* chore(repo): build after merging
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Diffstat (limited to 'zellij-utils/src/input/options.rs')
| -rw-r--r-- | zellij-utils/src/input/options.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/zellij-utils/src/input/options.rs b/zellij-utils/src/input/options.rs index 861e4877..bc23cf3c 100644 --- a/zellij-utils/src/input/options.rs +++ b/zellij-utils/src/input/options.rs @@ -89,6 +89,10 @@ pub struct Options { #[clap(long)] #[serde(default)] pub copy_on_select: Option<bool>, + + /// Explicit full path to open the scrollback editor (default is $EDITOR or $VISUAL) + #[clap(long, parse(from_os_str))] + pub scrollback_editor: Option<PathBuf>, } #[derive(ArgEnum, Deserialize, Serialize, Debug, Clone, Copy, PartialEq)] @@ -131,6 +135,9 @@ impl Options { let copy_command = other.copy_command.or_else(|| self.copy_command.clone()); let copy_clipboard = other.copy_clipboard.or(self.copy_clipboard); let copy_on_select = other.copy_on_select.or(self.copy_on_select); + let scrollback_editor = other + .scrollback_editor + .or_else(|| self.scrollback_editor.clone()); Options { simplified_ui, @@ -146,6 +153,7 @@ impl Options { copy_command, copy_clipboard, copy_on_select, + scrollback_editor, } } @@ -178,6 +186,9 @@ impl Options { let copy_command = other.copy_command.or_else(|| self.copy_command.clone()); let copy_clipboard = other.copy_clipboard.or(self.copy_clipboard); let copy_on_select = other.copy_on_select.or(self.copy_on_select); + let scrollback_editor = other + .scrollback_editor + .or_else(|| self.scrollback_editor.clone()); Options { simplified_ui, @@ -193,6 +204,7 @@ impl Options { copy_command, copy_clipboard, copy_on_select, + scrollback_editor, } } @@ -244,6 +256,7 @@ impl From<CliOptions> for Options { copy_command: opts.copy_command, copy_clipboard: opts.copy_clipboard, copy_on_select: opts.copy_on_select, + scrollback_editor: opts.scrollback_editor, } } } |
