From c0ee0d6edc1e53254efe1c659a22125591546cce Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 1 May 2026 21:06:41 +0300 Subject: [PATCH] fix: MODEL button in MSPACE now returns to paper space instead of Model tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When editing inside a viewport (MSPACE), the status bar MODEL button was sending LayoutSwitch("Model") which switched the entire layout to the Model tab. The intended behavior (and what the comment documented) is ExitViewport — just exit the active viewport back to PSPACE. Fixes part of #10 Co-Authored-By: Claude Sonnet 4.6 --- src/ui/statusbar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/statusbar.rs b/src/ui/statusbar.rs index d5b4aa177..f0505f34d 100644 --- a/src/ui/statusbar.rs +++ b/src/ui/statusbar.rs @@ -466,7 +466,7 @@ fn space_mode_btn(current_layout: &str, in_mspace: bool) -> Element<'static, Mes let (label, active, on_press) = if is_model_tab { ("MODEL", false, None::) } else if in_mspace { - ("MODEL", true, Some(Message::LayoutSwitch("Model".to_string()))) + ("MODEL", true, Some(Message::ExitViewport)) } else { ("PAPER", false, Some(Message::MspaceCommand)) };