From 3cf21c1cc2d82d96bd26cf5e5bf77b0fc7103376 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sun, 31 May 2026 10:20:39 +0300 Subject: [PATCH] chore(mtext): drop unused preview-edit message variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MTextType/MTextBackspace/MTextDelete were never emitted — preview typing, backspace and delete route through the existing CommandAppendChar / CommandBackspace / DeleteSelected handlers, which call the methods directly. Removes the dead variants and their arms (fixes a never-constructed warning). Co-Authored-By: Claude Opus 4.8 --- src/app/mod.rs | 6 ------ src/app/update.rs | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index fa1e4fe80..ce660b5df 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -744,12 +744,6 @@ pub enum Message { MTextSelStart(usize), /// Extend the preview selection to the given visible-character offset. MTextSelTo(usize), - /// Type text at the preview caret (replacing any selection). - MTextType(String), - /// Backspace at the preview caret. - MTextBackspace, - /// Delete-forward at the preview caret. - MTextDelete, /// Move the preview caret by N visible characters. MTextCaretMove(i32), /// Commit the editor: create or update the MText entity. diff --git a/src/app/update.rs b/src/app/update.rs index 058600b2e..a1353b987 100644 --- a/src/app/update.rs +++ b/src/app/update.rs @@ -3591,18 +3591,6 @@ impl OpenCADStudio { } Task::none() } - Message::MTextType(s) => { - self.mtext_type(&s); - Task::none() - } - Message::MTextBackspace => { - self.mtext_backspace(); - Task::none() - } - Message::MTextDelete => { - self.mtext_delete(); - Task::none() - } Message::MTextCaretMove(d) => { self.mtext_caret_move(d); Task::none()