(&mut self)
| 1789 | } |
| 1790 | |
| 1791 | fn copy_prompt_to_clipboard(&mut self) { |
| 1792 | let content = self.prompt.get_input().trim(); |
| 1793 | if content.is_empty() { |
| 1794 | return; |
| 1795 | } |
| 1796 | if let Err(err) = Clipboard::write_text(content) { |
| 1797 | self.alert_dialog |
| 1798 | .set_message(&format!("Failed to write clipboard:\n{}", err)); |
| 1799 | self.alert_dialog.open(); |
| 1800 | } |
| 1801 | } |
| 1802 | |
| 1803 | fn cut_prompt_to_clipboard(&mut self) { |
| 1804 | let content = self.prompt.get_input().trim(); |
no test coverage detected