diff options
Diffstat (limited to 'src/repl')
| -rw-r--r-- | src/repl/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 3edf5f6..118ff0c 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -273,9 +273,7 @@ impl Repl { ensure_model_capabilities(client.as_mut(), input.required_capabilities())?; let output = render_stream(&input, client.as_ref(), &self.config, self.abort.clone())?; self.config.write().save_message(input, &output)?; - if self.config.read().auto_copy { - let _ = self.copy(&output); - } + self.config.read().maybe_copy(&output); Ok(()) } @@ -352,7 +350,7 @@ Type ".help" for more information. fn copy(&self, text: &str) -> Result<()> { if text.is_empty() { - bail!("No text") + bail!("Empty text") } set_text(text)?; Ok(()) |
