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.
This commit is contained in:
LGUG2Z committed 2026-10-31 12:14:35 -07:00
1 parent 03404aab07
commit 839dd2a2de
1 file changed
+2 -4
+2 -4
View File
@@ -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()