From 839dd2a2deea4d166eba317ea282ef6bfe11db89 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 11:59:00 -0700 Subject: [PATCH] refactor(windows): reintegrate_maximized_window has KDE's error strings and Copy form "there is no maximized restore index" and "there is no maximized window" replace the two strings that were copied from the monocle code, and the as_ref plus deref of the maximized window is dropped (Window is Copy), as on KDE. Item 7 of the Windows list in core-model.md section 7. BEHAVIOUR: only the text of two error messages, shown if a command asks to toggle maximize with nothing maximized. e2e gate: none needed beyond maximizing. Verified: Windows clippy -D warnings via tools/fast-check PASS. --- komorebi/src/workspace.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/komorebi/src/workspace.rs b/komorebi/src/workspace.rs index 3b34259f..5a9c7e01 100644 --- a/komorebi/src/workspace.rs +++ b/komorebi/src/workspace.rs @@ -1943,14 +1943,12 @@ impl Workspace { pub fn reintegrate_maximized_window(&mut self) -> eyre::Result<()> { let restore_idx = self .maximized_window_restore_idx - .ok_or_eyre("there is no monocle restore index")?; + .ok_or_eyre("there is no maximized restore index")?; let window = self .maximized_window - .as_ref() - .ok_or_eyre("there is no monocle container")?; + .ok_or_eyre("there is no maximized window")?; - let window = *window; if !self.containers().is_empty() && restore_idx > self.containers().len().saturating_sub(1) { self.containers_mut()