Add a new empty param row
(&mut self, window: &mut Window, cx: &mut Context<Self>)
| 49 | completion_engine: Option<CompletionEngine>, |
| 50 | } |
| 51 | |
| 52 | impl ParamsEditor { |
| 53 | pub fn new(completion_engine: Option<CompletionEngine>, cx: &mut Context<Self>) -> Self { |
| 54 | Self { |
| 55 | param_rows: Vec::new(), |
| 56 | bulk_mode: false, |
| 57 | bulk_editor: None, |
| 58 | focus_handle: cx.focus_handle(), |
| 59 | completion_engine, |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | fn ensure_bulk_editor(&mut self, window: &mut Window, cx: &mut Context<Self>) { |
| 64 | if self.bulk_editor.is_none() { |
| 65 | let completion_engine = self.completion_engine.clone(); |
| 66 | self.bulk_editor = Some(cx.new(|cx| { |
| 67 | configure_completion( |