From d217248ac3171aac1812e3b232eaa120e1d7668c Mon Sep 17 00:00:00 2001 From: ramox81 <184937705+ramox81@users.noreply.github.com> Date: Tue, 13 Oct 2026 15:28:36 +0300 Subject: [PATCH] CLIP: Enter at the object prompt ends silently Co-Authored-By: Claude Opus 5.5 --- src/app/command_driver/mod.rs | 4 +++- src/command.rs | 3 ++- src/modules/insert/xclip.rs | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/command_driver/mod.rs b/src/app/command_driver/mod.rs index 5f28a6a94..c711a257b 100644 --- a/src/app/command_driver/mod.rs +++ b/src/app/command_driver/mod.rs @@ -1295,7 +1295,9 @@ impl OpenCADStudio { self.tabs[i].snap_result = None; self.tabs[i].scene.clear_preview_wire(); self.restore_pre_cmd_tangent(); - self.command_line.push_output(&msg); + if !msg.is_empty() { + self.command_line.push_output(&msg); + } } fn handle_report_measurement(&mut self, msg: String) { diff --git a/src/command.rs b/src/command.rs index adb883d84..dceb89436 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1943,7 +1943,8 @@ pub enum CmdResult { p1: DVec3, p2: DVec3, }, - /// Print a measurement result to the command line and end the command. + /// Print a measurement result to the command line and end the command + /// (an empty one ends it silently). Measurement(String), /// Print a measurement result and keep the command active. ReportMeasurement(String), diff --git a/src/modules/insert/xclip.rs b/src/modules/insert/xclip.rs index d96669786..675b5a311 100644 --- a/src/modules/insert/xclip.rs +++ b/src/modules/insert/xclip.rs @@ -550,9 +550,10 @@ impl CadCommand for ClipCommand { self.inner.as_mut().and_then(|c| c.on_text_input(text)) } fn on_enter(&mut self) -> CmdResult { + // Enter before an object is picked ends CLIP without a message. self.inner .as_mut() - .map_or(CmdResult::Cancel, |c| c.on_enter()) + .map_or(CmdResult::Measurement(String::new()), |c| c.on_enter()) } fn on_mouse_move(&mut self, pt: DVec3) -> Option { self.inner.as_mut().and_then(|c| c.on_mouse_move(pt))