merge: TEXTEDIT command + TEXTEDITMODE sysvar (#130)

Merge PR #130 (KarimJerbi) and resolve review findings:

- Conflict (settings.rs): keep current persisted-settings layout, append
  texteditmode field.
- Conflict (command/mod.rs): keep both new CmdResult variants — main's
  live-entity ops and the PR's text-edit suspend/resume.
- Bug: invalid TEXTEDITMODE value no longer aborts via the Measurement
  arm; it now re-prompts with the error and stays active.
- Dedup: single parse_texteditmode() helper replaces the value parsing
  duplicated across commands.rs, settings.rs and textedit.rs.
- Strip trailing whitespace.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-21 12:05:54 +03:00
commit 8c48233dcf
11 changed files with 399 additions and 14 deletions

View file

@ -242,6 +242,8 @@ pub(super) struct OpenCADStudio {
show_grid: bool,
/// Dynamic input overlay (F12): show coordinate tooltip near cursor.
dyn_input: bool,
/// Controls whether the TEXTEDIT command repeats automatically (0 = Multiple, 1 = Single).
pub texteditmode: bool,
/// `true` after a bare `VPORTS` in model space — the next command-line
/// entry is treated as the tiled-config option (SIngle/2H/2V/4).
awaiting_vports: bool,
@ -1686,6 +1688,7 @@ impl OpenCADStudio {
polar_increment_deg: 45.0,
show_grid: false,
dyn_input: true,
texteditmode: false,
awaiting_vports: false,
tile_drag: None,
dyn_user_reshaped: false,